Make options.parse_config_file supporting custom encoding
Assume all config files are encoded in UTF-8
Fixes bug disallowing custom-made reason phrase

The send_error method is, I believe, supposed to allow sending an HTTP reason phrase that is not one of the standard ones. This change corrects an apparent bug which made this impossible. With the correction, specifying an 'error' keyword argument to send_error actually sends the specified
reason phrase to the client.
remove dead code

io.BytesIO is available since Python 2.6; Tornado doesn't support Python 2.5, so there won't be ImportError.
Fix example in docs.
Merge branch 'branch4.0'
Merge pull request #1109 from kmike/bytesio

Removed dead "io.BytesIO vs cStringIO.StringIO" code
Merge pull request #1102 from pekrau/master

Add 'reason' kwarg to send_error.
Merge pull request #1086 from likang/master

Make options.parse_config_file supporting custom encoding
Read config file in binary mode instead of try/except TypeError.