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
Merge pull request #764 from bkase/message-refactor

Refactor old C->JS code to use new JsMessages