Improved Promise typedef (follow lib intentions)

I propose the following changes to parse.com tydefs
It's my first ever contribution to a github project, so i think i need to signal you that I have made changes and request a pull in to the main branch.
But I must admit i clueless to how this github stuff works :)
Punch me if I am doing it wrong...

Interface Promise<T> was missing the static methods: as, error, is and
when
- Changed interface Promise<T> to class promise<T>
- Added static methods of 'as', 'error', 'is' and 'when'
- Removed instance methods 'as', 'error', 'is' and 'when'
- Changed resolvedCallback of 'then' to use ...value: T[] instead of
value: T (lib intention)
- Changed interface IPromise<T> to use ...value: T[] instead of value: T
(lib intention)