Write response back to the client

Not writing anything is bad, just tell the client that everything went
ok when joining/leaving.
Code cleanup.

Remove useless imports
Delete png files after compilation succeeded

If compilation of a paper succeeded, generated png pages are now
probably obsolete.
Merge remote-tracking branch 'upstream/master' into wip-web-client