Apple docs for best-practice app termination
Some docs based on empirical evidence
Use UIApplication private API and delegate to quit gracefully

This ensures that UIApplicationDelegate methods:

* applicationWillResignActive:
* applicationWillTerminate:

are called and the app will exit with success.
Allow the http payload to control exit behavior

* applicationWillResignActive: might need longer times for some
  app that cache a lot of data.

* controling the exit code is essential for code coverage.
Merge pull request #69 from calabash/feature/gracefully-exit-the-app

Gracefully exit the app