Correctly send join message

Even if no users where on this resource, at least the newly connected
one gets notified of it join. It can be useful for managing resources in
the resource actor.
Code improvements

While debuggin the problem with the join message I had to add some
logging here and there, and I fixed some code style issues that led to
timeouts under certain circumstances. It would be a pity to throw
everything away, so I include it here. The code should be more robust
now.
Merge pull request #77 from satabin/wip-correct-join

Fix join message
[imp #78] Always retrieve broadcast message

Instead of sending pending messages when the user sends a specific message,
always send them back with any synchronization session.
Do not delete peer when retrieving messages

Its list of pending messages is simply reset but the peer itself is not
removed from the list of connected peers.
Merge pull request #79 from chemicalstorm/fix-78

[imp #78] Always retrieve broadcast message
Replace malformed input character and go on

if input is malformed in a log file, just replace the malformed
character with the default codec replacer and continue decoding instead
of failing.
Send log in UTF-8
Remove unused files

Remove minify files and remove unused files of external libraries
Update AngularJS to 1.2.18
Update pdfjs to 1.0.68
Adapt architecture to support multi paper format

With this new architecture it is easier to support a new paper format.
Improve UI

Small UI changes
Add JSON MobWrite format support

Add the support of the JSON MobWrite format described in \BlueLaTeX project.
Use server configuration.

Use the configuration file generated by the server instead of hard coded value.
Rename rootApiUrl to api_prefix
Improve error page 404

Add text to explain the error
Move external library to lib folder
Remove latex folder

Move content of latex folder to paper folder
Create LatexService to parse latex content

Parse table of contents of a latex file
Extract latex commands declared in latex file
Fix keep session alive