Phonegap3 improvements

The 3 commits you asked. I'm working on a separate branch to fix rotation issue.