Ensure "this" is set correctly inside onDeviceReady

Messed up the last pull request, let's try this again:

Currently the value of `this` inside `onDeviceReady` is not set to `appomat.app` as most people would expect. This tripped me up once I started adding methods and state to the `app` object.