Substitute all `dict.iteritems()` with `dict.viewitems()`

Substitute OrderedDict key,value iterators with dict.viewitems()
to make compatible with Python3. `viewitems()` is the same as `iteritems`
in python2.7