Abstract Promise.cast algorithm into ToPromise.

It will be useful for Promise.race and Promise.all.
Add Promise.race (#13).
Fix typo in Promise.reject sample implementation.
Add Promise.all. Closes #13.