Move tern server into a web-worker.

Had to add requirejs to the extension to make everything work in a web-worker.
Added tern-worker.js, and modified ScopeManager to post messages to the worker to find completions.