Wrap notification polyfills in a decent test for the absence of cordova, so ...

they don't override the cordova functions, which may happen after app.js is
evaluated.

This branch almost exactly the same stuff as the prior one of the same name, but without all the merge/rebase baggage.