feat($q): add optional canceler and promise.cancel method

Add an optional argument to $q.defer to provide a canceling function.
This exposes a promise.cancel method that can be used to call the
canceling function and reject the promise (and all derived promises).
See existing implementations in Dojo Toolkit and Promised-IO library
for reference.