Fix applications startup

* crypto must be started before public_key
* cowlib was miswritten
* ok = application:start() will prevent silent errors during setup
Catch handshake error and raise status code and message
Merge pull request #32 from edgurgel/catch-handshake-error

Catch handshake error