allow js tests to run with tornado 4 and phantomjs
forward-port draft76 websockets

from tornado-3.2.2

only enabled during testing with phantomjs
don't pin tornado<4 on travis
bump minimum tornado version to 4.0

remove various websocket workaround for tornado 3
Merge pull request #6886 from minrk/tornado-4

require tornado 4