JSX: Respect original spacing and newlines better

Fixes #335.

Now this JSX:

```
/** @jsx React.DOM */
var HelloMessage = React.createClass({
  render: function() {
    return <div>
      Look!
      <a href=
        "http://www.facebook.com/">Facebook
      </a>
    </div>;
  }
});
```

produces

```
/** @jsx React.DOM */
var HelloMessage = React.createClass({displayName: 'HelloMessage',
  render: function() {
    return React.DOM.div(null,
      " Look! ",
      React.DOM.a( {href:
        "http://www.facebook.com/"}, "Facebook "
      )
    );
  }
});
```

rather than the less-desirable

```
/** @jsx React.DOM */
var HelloMessage = React.createClass({displayName: 'HelloMessage',
  render: function() {
    return React.DOM.div(null,
" Look! ",      React.DOM.a( {href:"http://www.facebook.com/"}, "Facebook "      ),
    );
  }
});
```
Fix ReactRenderDocument tests

I am unsure how this was ever supposed to work, as testDocument is guaranteed to be undefined at that point since beforeEach doesn't run synchronously. (I don't think there's any way to have beforeEach halt the tests.)
Fix full-page rendering

Closes #337.

Test Plan:
Opened react-page sample without any JS errors. Also ran grunt test after cherry-picking this changeset on top of #338.
Merge pull request #344 from benjamn/fix-silent-test-failure-due-to-requiring-React

Use a regular expression to parse out React.version
Merge pull request #339 from spicyj/doc-rendering

Fix full-page rendering
Merge pull request #338 from spicyj/fullpage-tests

Fix ReactRenderDocument tests
Update wording
Ensure selection range exists

The selection object doesn't always have ranges. In Chrome the
selection is not updated before 'focus' event handlers are fired. See
http://jsfiddle.net/t4DYA/ for example.

The selection will have rangeCount of 0 and calling getRangeAt(0) will
throw error "Uncaught IndexSizeError: Index or size was negative, or greater
than the allowed value."
Fix lint errors in tests
Stop ReactInputSelection breaking in IE8

In the IE code path the method assumed that the input.value property
was non-null. A quick fix is to use either value or innerText; which means
the same code can be shared for textarea and contentEditable components.

The code is slightly buggy because the range.parentElement() !== input check
will fail for contentEditable components when the focus within a deep DOM tree.
Add link to third-party `JavaScript (JSX).tmLanguage` in docs.
Merge pull request #356 from yungsters/master

Add link to third-party `JavaScript (JSX).tmLanguage` in docs.
Flesh out reference documentation, more API info
Fix DOM node warning

bdf2a9bb124b8fc34120949b322202497741f239 broke the warning that children aren't suppose to be real DOM nodes.
Fix PropTypes Documentation
Merge pull request #351 from spicyj/api-docs

Flesh out reference documentation, more API info
Make constant propagation smarter about pruning if statements.
Don't update the docs version by default

This was leading to a lot of unnecessary churn in the config file since
different YAML versions were serializing differently.
Merge pull request #343 from benjamn/fix-if-statement-pruning

Make constant propagation smarter about pruning if statements
Give the user a warning when using unoptimized JSX code and send the user to the correct location in the documentation to optimize.