Handle close control messages properly

There are two API changes:

- The Close control message now has the code and reason
- A new exception of type CloseRequest with the code and
  reason is thrown when the peer requests a close.

Internally, a close request from the peer automatically causes
a close message to be sent back before throwing the exception.

For more details, see
http://tools.ietf.org/html/rfc6455#section-7