Fix a few stupid bugs in zdevents. IMPORTANT: requires Python 'enum34'.

For this to run, you must install the 'enum34' Python backport, which includes
the Enum class that zdevents uses. You should probably use pip to install it.
To make this easy, I have added a list of packages required for things to work,
in misc/resources/pip-deps.txt, which you can use by running:

    pip install -r misc/resources/pip-deps.txt