Compile only when document has been modified

This PR fixes the interface provided in blue-sync to retrieve he last modification date of a paperId.
Also, it implements its use in blue-compile, so that document are compiled only when they have been modified (since their last compilation)