Replaces sbt AJAX calls with web socket. Also some refactoring of code.

My bad. There are some minor changes in there. No exceptional change though.
Most noteworthy are lines 113-114 where we now return more than the actual result from sbt server. This is where the introduction of ``serialId`` comes into play.