Make SockJSService API smarter.

Now you can queue stuff to happen after the socket is connected, and
register event handlers without having to set them directly on the
socket object (i.e. allows multiple event handlers). Event handlers are
automatically destroyed upon state changes.
Fix some stuff in PG file preview with student data.
Some more SockJS cleanup.
Student monitoring should work much better now.
Merge branch 'master' of github.com:yoavfreund/Webwork_AdaptiveHints