Fix error in handling of '?' in URLs

When there is no '?' in the URI, zmq_subscriber would truncate the last letter.
This patch also adds some missing docblocks to methods in handlers.py and
provides a helper function, 'iter_text', for iteratively reading UTF-8-encoded
lines of text from a file-like object.

Change-Id: I4150bc7316c70fac661fe871b0123b28a8cb0642