(#1221) - Add ES5 shims for common functions

This adds the minimal shims I found were necessary
to allow basic Pouch functionality on older
browsers that we could still be reasonably expected
to support (i.e. because they at least have WebSQL).

The oldest browser tested was an HTC Magic running
Android 2.1 WebView.