Client improvements.

- Allow passthrough of basic authentication credentials to Tornado.
- Allow setting of action from the command line.
- Pick default port based on SSL useage and default ports.
Client Improvements #2

- Make handle stream handle all types of newline
- Strip the parsed field name (RFC allows whitespace)
Tidy Ups

- Remove uneeded strip()
- Correctly pass through user specified port
Eliminate warning by using pycharm inspector
Use json_encode, json_decode from tornado in listener.py
Handle naughty implementaions
added certificate validation support
merge patches from v00d00/client-improvements
merge patches from socketpair/pycharm+json fixes