New API for receipt checks on start (bug 981235)

Any r on the new API? You could ignore all the diff churn and just check the readme.

This change sets the stage for receipt verification which needs to happen when an app first loads. The purchase function will now invoke the same ``onpurchase()`` callback as receipt restoration would. However, receipt restoration will land in a future bug.