Added typings to jQuery promises and deferreds.
Minor fixes for issue #726
Added generic typing to jQuery.when