core: fix for working with python 3.3

The unfixed parse_querystring() raises the following exception
in Python 3.3:

  TypeError: Type str doesn't support the buffer API

Also removed iteritems() as it is deprecated and no longer
supported in Python 3.x
Merge pull request #115 from melor/py33

core: fix for working with python 3.3