Added on reply/request/connect functions. 

* Also fixed some defaults arguments.
* Also added some support for functionality recently added to bosh/tcp e.g. not crashing on bad parse and "timeouts" Needs more work though

Problems:
Lots of {ok, _} = which will cause crashes
Not sure when on_error is called, if it is going to return failed requests for example. timeouts etc
Will do so