Fix dialyzer warnings and try to mimic Cowboy's request interface

We are planning on using your websocket client on a project and we've made some modifications to accomodate our needs. We've basically fixed the dialyzer warnings and have exposed the websocket's internal state to the callbacks in a way that is similar to what [Cowboy](http://github.com/extend/cowboy) does with HTTP requests.

We're creating this pull request in case you're interested in integrating our changes to your repository.

Thanks.