Allow HttpResponse objects to be returned from ajax functions

Allowing HttpResponse objects allows ajax functions (or decorators)
to implement better error handling (such as a 401 for Unauthorized),
which follows the HTTP specification more closely.