add websocket support to /container/<name>/attach/ws

This function add the possibility to attach containers streams to a
websocket. When a websocket is asked the request is upgraded to this
protocol..
put the websocket route in the map containing all routes

Instead of handling the websocket differently just handle it as a normal
route and upgrade it to a websocket.
useless type
useless function. forgot to remove it.
reuse the type
make docker run handle SIGINT/SIGTERM
Exit from `docker login` on SIGTERM and SIGINT.

Fixes #1299.
Use a more idiomatic syntax to capture the exit.
Allow to generate signals when termios is in raw mode.
Sort APIImages by most recent creation date.

Fixes #985.
Merge branch 'master' into login_signal

* master: (54 commits)
  Return JSONError for HTTPResponse error
  Fix TestEnv
  Revert "Bind daemon to 0.0.0.0 in Vagrant. Fixes #1304"
  Add unit tests for build no cache
  Add no cache for docker build
  Move note about officially supported kernel
  Solved the logo being squished in Safari
  Add hostname to the container environment.
  fix same issue in api.go
  improve tests
  Return registy status code in error
  update http://get.docker.io/latest
  Add check that the request is good
  fix tests about refactor checksums
  add ufw doc
  Fixed a couple of minor syntax errors.
  Updated the description of run -d
  Make sure the index also receives the checksums
  Switch json/payload order
  Remove unused parameter
  ...
Stop making a raw terminal to ask for registry login credentials.

It only disables echo asking for the password and lets the terminal to handle everything else.
It fixes #1392 since blank spaces are not discarded as they did before.
It also cleans the login code a little bit to improve readability.
Exit if there is any error reading from stdin.
Print a new line after getting the password from stdin.
Assume that if VAGRANT_DEFAULT_PROVIDER is set we shouldn't install vbox tools
Merge branch 'feature/attach_ws' into feature/attach_ws2

Conflicts:
	api.go
Mount /dev/shm as a tmpfs

Fixes #1122.
Make sure all needed mountpoint are present
Improve TestGetContainersTop so it does not rely on sleep
fix docker build and docker events output