Updates to adapter.js

This is the first in a series of pull requests to enable transition to a 'mobile friendly' UI, along with some additional code tweaks. (See [apprtc-m.appspot.com](https://apprtc-m.appspot.com) for 'full fat' version.)

This pull request includes minor edits to adapter.js (in addition to Vikas's changes) to enable full JSHint validation:
· added JSHint options
· single quotes throughout
· added missing semi-colons
· added `window.` where necessary
· added `var` where necessary
· changed `==` to `===`

Also made some minor tweaks to code formatting and changed to camelCase throughout.
Make scope explicit.