Try to send stack trace over POST if XMLHttpRequest is available

Sending a long stack trace with a GET request can cause a lot of issues,
since many browsers / web servers limit the length of requests to a smallish
value (like 4096 bytes).

This patch checks if XMLHttpRequest is available, and if so uses that
instead of creating an image. We can send POST requests with XMLHttpRequest,
which avoids the length restrictions on GET requests.
Merge branch 'post-requests'

* post-requests:
  Try to send stack trace over POST if XMLHttpRequest is available