fix inconsistent behavior when working in multiple browsers, see #196

- add initialization of wonService to the main.js, so that the message callback is always assigned;
- ignore incoming messages in case the local application state doesn't contain the message receiver need