added tests for callback order

This commit is basically an example to show that you can't rely on callbacks from separate deferreds to fire in the same order that their corresponding deferreds were resolved
fixed order of callback chain invocation by using dispatch_sync

see comments in resolveWith: