jshint: js code validation and beautification

As discussed with Justin, this pull request includes the following changes: 

1. Ran JavaScript beautifier, as per jsbeautifier.org – this is not strictly anything to do with JSHint but makes it easier to spot invalid code. (We may want to tweak code layout further at some point – opinions vary...)

2. Added global 'use strict' to main.js and updated code to avoid errors.

3. Added JSHint options to main.js and updated code to validate.

@juberti and @marwahvikas PTAL.

Changed back.


On Sun, Jun 8, 2014 at 10:51 PM, Justin Uberti <notifications@github.com>
wrote:

> In samples/web/content/apprtc/js/main.js:
>
> > @@ -67,8 +81,7 @@ function initialize() {
> >    // Caller is always ready to create peerConnection.
> >    signalingReady = initiator;
> >
> > -  if (mediaConstraints.audio === false &&
> > -      mediaConstraints.video === false) {
> > +  if (mediaConstraints.audio === false && mediaConstraints.video === false) {
>
> I preferred the old form here.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleChrome/webrtc/pull/71/files#r13526439>.
>