Q: moved from module to interface approach

To cater for likely Declaration Merging bug in TypeScript 0.9.5.

There have been changes to the tests purely because interfaces are no
longer nested in a module:

Q.Promise => QPromise
Q.IPromise => QIPromise
Q.Deferred => QDeferred
Q.PromiseState => QPromiseState