Added crypto helper functions.
Testing additional assumptions.
Server will raise error on cleanup when needed.

If the main server thread fails for some reason a call to cleanup will reraise the error
caught.

Fixes weird errno issue where it ZMQ errno isn't the same with sequential
calling.  Could not prove this out in a simple test case.
Added missing line to crypto.