API rewrite

Big rewrite of the API as announced on the mailing list.

* Removed all input stages
* Stages no longer have access to RemotePipeline.
  To discard a document, call LocalDocument#discard
  To get document attachments, call LocalDocument#getFile et.al.
* Now uses Guava Service instead of handling the lifecycle of long living threads ourselves.
* Uses Jackson for json deserialization. This removes the need for our own deserialization library.
* Uses hibernate-validation for validation of Stage beans.
* All exceptions thrown in stage implementations are now caught and fails the document.