Changes the the ajax error handling to only fail the promise once the re...

The original implementation of the $.ajax handler would fail the promise as soon as the header was received with a 4xx level response code.  

This change does two things:
- Delays failing the promise until we reach readyState == 4 (DONE)
- Call `promise.notify` so that the receiver can get called for each readyState.  This would allow them to fail fast if they really wanted this behaviour.

@nsimmons @pseudomuto