AJAX: Support Chrome's preflight OPTIONS request to look for CORS headers

It also makes sense to configure Apache to add CORS headers to each
response:

SetEnvIf Origin "^https?://(your-web-app)$" origin_is=$0
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
Header always set Access-Control-Allow-Headers "x-requested-with"
Merge pull request #76 from shatlovsky/master

AJAX: Support Chrome's preflight OPTIONS request to look for CORS headers