Changes for the email demo

This Pull Request contains the patches for the reconnect behavior and for the email demo, so feel free to ignore the 'reconnect' branch once you merge this.

The main changes here are:

- I implemented the reconnect push notification when we lose connection with the server;
- We now also receive the address of the IMAP server in the POST along with all the other info. This makes it possible for us to choose the best IMAP server from within the email app, and support other mail services in the future.