Fix InAppBrowser on iOS 5.

We were calling an iOS 6-only method during initialization.
CB-2225 Take Two

The original fix didn't correctly detect if the load was a PDF and was
applying the "fix" to all InAppBrowser loads. This cause the
InAppBrowser to be affected by the whitelist when it shouldn't be.
Fix CB-2271 - Multiple Cordova Views.

The problem was that multiple views loading at the same time would end
up with the same User-Agent. This change adds a locking mechanism around
User-Agent setting, so that multiple views will load in serial instead
at the same time.

Adds a unit test that failed before the fix, but now passes consistently

https://issues.apache.org/jira/browse/CB-2271