Allow for overriding the ajax function on a per-call basis.

included an error args fix from master
Use ajax's "then" instead of {success:...,error:...}

This allows for implementors of ajax functions to not need to look for
success, error callbacks in their options.
promises - guarantee options.success/error are called first