python3: make list out of dict view object when appropriate
In py2, dict.keys() gives a list. In py3 it gives a view object,
which can't be indexed. In a few cases in wikitcms we want to
index the keys of a dict (or OrderedDict), so explicitly create
a list from the view object when we're doing that.