added retry callback

If an ajax request times out and retry is enabled the retry event fires returning the try_count.
Handy if you want to inform the end user what's going on.

P.S. I added the 'retry' trigger after the 'before' trigger in the _fail routine for a specific reason. 'before' shows the loading... dialogue, 'retry' modifies the dialogues text to retrying... (1), retrying... (2), retrying... (3) etc.