Add REST and SocketIO endpoints

* Use SocketIO instead of plain Websockets to avoid issues with
  disconnects and management of multiple channels
* Add repository handling to clone, update, checkout, and patch
  repositories.
* Check for simple `models.json` spec to repository root to define how
  to build and run models

* GET /repos - lists repositories
* POST /repos - adds a repository, see README
* POST /repo/<name>/patch - adds a new default patch to the repository
* GET /repo/<name>/revs - lists revisions in that repository
* GET /repo/<name>/HEAD/models - lists models specified in the HEAD
  revision
* GET /repo/<name>/<rev>/models - lists models specified in that revision
Remove dead code
Handle thread stop/start better; clean up logging output
Remove `CrossCat` from models.json in patch