Various fixes, interface cleanups.

Adding a close method for when the connection should be cleanly
terminated. Adding create/1 which can take a #filter record.
The crypto results are now wrapped in a hex digest, since otherwise
control characters may be sent.
Fixing several bugs

Trap any exits now so we can cleanly finish. Fixing some
equality vs inequality operators.