templater: implement _hybrid.__contains__ so that ifcontains can accept dict
d8fb835376d1 is fine for "{revset()}", but "i.values()[0]" does not work if
each item has more than one values such as "{bookmarks}".
This fixes the problem by using list.__contains__ or dict.__contains__
appropriately.