add support for registering a deferred ajax call
Merge pull request #1 from lauripiispanen/master

Precise control over ajax responses with deferreds