Refactored misc ADB code to use JsMessage

Moved restart_me from callback function to MSG
DRY with CommonMessageHandler
Moved getLastError to JsMessage
Ported web-worker spawning to JsMessage
Return -1 on unknown message and catch all errors
Moved try-catch surrounding all logic in handler