Extract paper and class from TeX source

Instead of reading the paper title from the PDF metadata, which are not
set by default by the pdflatex compiler, this piece of information is
extracted from the source.
This is not really reliable as is because now that there are support for
several files, the title and the class may be defined in an other than
the main paper file, but it should be ok in most of the cases.
[imp #35] Improved compilation results

When subscribing to the compilation channel of a paper, several things
can happen in return:
 - the compilation succeeded, in which case the server says ok by
   returning `true`
 - the compilation failed, in which case the server returns an error 500
   (Internal Server Error) with the appropriate error object
 - the compilation was not necessary, in which case the server says
   `false` with status 304 (Not Modified)
 - the compilation task was not started (typically, nobody joined the
   paper before registering to this compilation channel), in which case
   the server returns an error 509 (Service Unavailable) with the
   appropriate error object
[fix #51] Correctly return default index file

When the base URL is accessed with no file name, an empty file was
returned. This is due to how the `getResource` method works with
resources in a jar file (actually it would behave the same in any zip
file). If the jar file contains directory entries, an empty stream to
the directory entry is returned, and the `WebLet` think the resource is
found. It is probably safe in \BlueLaTeX to assume that the web client
does not serve any empty static file. Thus, we can filter them out.

Closes #51
Update with breaking changes from sohva

The new version of sohva has some breaking changes in its interface.
Update to the new snapshot version, and fix uses of sohva classes.
Fix paper creation with non default template

The class file was copied before the paper directory was created, which
of course results in some problems that were silently ignored because no
logging was done...
Update configuration

To implement #39 we need a way to configure the prefix of the \BlueLaTeX
Rest API.
The configuration was reworked to be able to bind to any host as well.
Close inpout stream before opening output stream

On windows a lock is hold on the file as soon as we open it for reading.
Close the input stream before we can open the output stream with no
problem.
[imp #39] Make the API prefix configurable

If \BlueLaTeX is not installed at the root of the virtual host, using
the API matchers strips the configured prefix for you, so you can write
your paths without worrying about it.
Merge pull request #54 from satabin/wip-compilation-status

[imp #35] Improved compilation results
[imp #12] Save paper last modification time

When we compile the paper, save the last modification time if necessary,
this can be retrieved by the client when asking for project information.
Merge pull request #58 from satabin/feature-12-last-compilation-date

[imp #12] Save paper last modification time
Windows doesn't like mapping files into memory

There is no way to close the mapping without calling explicitly the GC
after having nulled all references. So let's use a ByteBuffer instead.
Make path separator system dependent

This is part of windows compatibility in #61
Handle process timeout in scala

`timeout` command under windows does not do what we expected it to do.
Handling it in scala should make the code much more portable.
This is part of ticket #61.
[imp #57] List of available templates

When the paper is created, the list of available templates is proposed
to the user.
For now this list is hard-coded in the client, but later on (when
treating #32) this list will be retrieved from the server amongst the
templates available to the user.

Closes #57
Adapt to new Sohva exceptions

Exceptions thrown by Sohva are now alway wrapped in a SohvaException,
event those coming from the couch server.
Fix password reset response

Parse as JSON the response of reset password
Redirect user to login page

When the user click on login redirect the user to the login page not to the root page.
Change the order of css file

The mobile.css must be the last file because it modify some style defined in other files
Improve mobile style