refactor($q): make $q Promises A+ v1.1 compilant

Refactor to make $q Promises A+ v1.1 compilant
I wonder if this was added in another commit intentionally... this is not in the shrinkwrap so it will not be installed