Added notifications arriving support

Handling the cases were the app is started, it's in the background,
and in the foreground.

Fixes for checking the notification key in app.json.
Fixes for errors found.
Less userdata.
Merge pull request #29 from reachlocal/notifications

Added notifications arriving support