allow setting user-defined status code when connection is closed

http://tools.ietf.org/html/rfc6455#section-7.4.2
Signed-off-by: Glenn Oppegard <goppegard@pivotallabs.com>