Integration of synchronization protocol

This PR improves the integration of the synchronization protocol into \BlueLaTeX current code by fixing some bugs and update the code to match the last version of the protocol.
Some unit tests were added to ensure compliance to specifications and ease future development on this part.