Fix xhr content-types.

Express.js expects a Content-Type to know how to parse the body.
By default jQuery send application/x-www-form-urlencoded transforming boolean
values into strings. So for instance false becomes "false".
When the payload comes back via the eventsource channel, testing the boolean
value will systematically succeed.

The fix adds the proper json content type (i.e. application/json) and encodes
the data vie JSON.stringify.
Merge pull request #35 from tOkeshu/fix-xhr-content-type

Fix xhr content-types.