[imp #2] Update SynchroServer interface

Change session() function return type: instead of plain String, we now expect a
Try[String]. This allows error processing and handling at caller level.
[imp #2] Add synchronization API

New synchronization protocol uses "/papers/$paperId/sync"
Mobrite-compatible protocol uses "/papers/$paperId/q"
Unify resource names

We have no use of file extensions to access the \BlueLaTeX resources, it
is much cleaner to have uniform resource names, also for generated pdf
files and all other pdf stuffs. Same applies for the zip archive that
can be downloaded.

This work prepares for the API extension required by #18.
Add API to retrieve number of pages

Once the paper is compiled, one can access the number of pages that was
produced in the compiled version.

closes #18
Rename `File` utilities

This class has become much more general purpose than it used to be.
Rename the utility class to make it much clearer when used.
Register Synchronization API

When the synchronization module is started, the synchronization API must
be registered to make it available to clients.
Do not pack legacy mobwrite module by default

This feature is not needed anymore since we have our native scala
implementation of the new protocol
Code cleanup

Some useless brackets and bundle meta data removed.
Don't use CPS method

we are not using the CPS feature of scala-arm. The right way to acquire
some resource and return some value computed from this resource is to
use the `acquireAndGet` method.
Remove useless print
Set correct length and content type
Remove legacy parameter

The `density` parameter does not cope well with the SyncTeX feature.
Besides, below 100 (or 96 maybe) the rendered result is barely readable,
above, it is really huge. This parameter raises some other probems (see
tickets #15 and #19).

What could be useful however, is a parameter `thumbnail` that would
generate a small version of the page for an overview. But even that I am
not sure it would be useful to have...
Make persist function synchronous

It was asynchronous, which did not fulfill the interface contract.
[fix #24] Really write file to disk

The map function on managed resources doesn't do what we hoped it does.
I should have better RTFM before writing this code. What we intend here
is `foreach`, which is now the case, and it really flushes to disk.
I also added a flush after writing, this should be handled in the close,
handled itself by the ARM library, but I think it is better to be
explicit here.

fixes #24
Fix compatibility translation

giving the paper identifier instead of the peer identifier as parameter
expecting the paper identifier is always a better idea.
Annotate tail recursive method

By adding this annotation we are sure the compiler sees this
optimization which could save our lives with big synchronization
sessions.
Update bnd version
Update to new dispatch version

Calling the shutdown method is not necessary anymore.
[fix #25] RAW command on empty file

When sending a RAW command to an empty file, the answer does not contain any
SyncCommand, whereas it should have contained at least one (maybe empty) Delta()
command. This is caused by an erroneus checks in the flushStack() function,
which does not output Delta() commands.

fixes #25
Fix handling of new empty file

A new file which is empty is first synchornized with a file command
without revision (because it is new) and an empty raw command.