fix($q): make $q.reject support `finally` and `catch`

Add support for the functions `finally` and `catch` to the
promise returned by `$q.reject`

Closes #6048
Closes #6076