Improves jQuery extension in xorg.js.
This provides the following Ajax-based API:
$.xget(url, data, onSuccess, onError, type);
$.xgetJSON(url, data, onSuccess, onError);
$.xgetScript(url, onSuccess, onError);
$.xpost(url, data, onSuccess, onError, type);
These functions support does the same as the jQuery's default ajax
function (without 'x' prefix) but distinguish the case of http success and
the case of http error (500, 40x). By default onSuccess is null, while
onError display an alert.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>