Headless Firepad mode for use with Node (or the browser)

Resolves https://github.com/firebase/firepad/issues/126

This PR:
* Moves a lot of text parsing logic out of `lib/firepad.js` and into
  * `lib/text-pieces-to-inserts.js`: for turning the results of `ParseHtml` into text-attribute pairs.
  * `lib/serialize-html.js`: for turning a `TextOperation` doc into HTML.
  * `lib/entity-manager.js`: registration of default entities is now just baked into the entity manager.
* Adds `lib/headless.js`, which can get/set text/html. Getters take a callback, setters take a value and an optional callback.
  * HTML handling works by using `jsdom` to set `firepad.document` which `EntityManager` and `ParseHtml` both will use instead of the default `document` object.
  * `FirebaseAdapater` will attempt to do `Firebase = require('firebase')` if Firebase is not present and require is available.
  * `FirebaseAdapater` can now be instantiated without a userId - in which case it will make up an author name but not connect to the users ref.
  * `FirebaseAdapter#sendOperation` now takes a completion callback.
* Adds coarse integration tests that validate that the CodeMirror and headless versions of Firepad behave the same way around the public API.
This isn't quite right.  A transaction only hits an error in exceptional cases (e.g. security failed).  I think we can still just throw an error in this case, since it's non-recoverable.

The case we need to retry on is when there's no error but committed is false.  That means we aborted the transaction, because somebody else wrote a new history item before ours got written.  

So I'd put this error handling back (and perhaps tweak the method comment regarding thrown exceptions).