fix compiler modification saving

 - fix validation function
 - fix revision when document is patched
improve hook handling
send join/part messages
Add `pdflatex` compiler

This is the default compiler that compiles paper using `pdflatex`