Refactoring Q, Deferreds and Promises

Promises now support independent types for the reject and resolve cases.
Merge branch 'topic/q'