Ajax Mediator

Added xhrhandler function to act as a compact ajax mediator. It kinda
supports the current $.ajax call syntax, but I'm not extremely familiar
with jQuery, so I did not change it yet.