mozilla/r2d2b2g — pull request #764 by bkase (2013-08-02 01:34:52+00:00)
Title: Refactor old C->JS code to use new JsMessages

Started big code refactor for moving all communication from C to JS to the new JsMessage.
See tasks

- [x] Send message responsible for restarting ADB
- [ ] Send getLastError message (needed for Windows driver calls)
- [ ] Send thread spawning messages

I made a minor change to MSG. Now it just returns the `void *` (that way it's easy to ignore). I still think it should be a macro just so we can avoid having to cast the argument to a `void *`.

Also made CommonMessageHandler so we don't have to copy paste handlers for messages common to all threads (which right now is ADB restarting).