Handle generic messages from the server

This adds a generic method to `notify` that doesn't care about the type
of notification. It also modifies main.js to listen for any `message`
that the server emits to this client.