Infinite Scroll: early set the DOING_AJAX constant.
Do it when the plugin is sourced -- don't wait until the `template_redirect` action.
Lets plugins / themes rely on the constant in prior actions (like `init`).
See issue: #1093
Infinite Scroll: Make sure it's an XHR before setting DOING_AJAX early.
- Check the X_REQUESTED_WITH request header.
- Fall back to setting the constant in the response function if it's not already.
- Improve commenting
Merge pull request #1094 from Automattic/infinity-early-doing-ajax

Infinite Scroll: early set the DOING_AJAX constant.