add code,reason for on_close callback 

I'm using this code for testing of websocket implementation. I've notices that it does not return the code and reason for close operation (Which is not supported, for example, in torndao 4.0).
Javascript implementation support this (https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent)

I've tried to write pull request to implement this, not sure my implementation is clean enough. I've used inspect to check whether the on_close callback except three arguments: self, code and reason.

Hope it will help.
Eran