Minor code reorg
Minor cleanup
Fix #207. Ignore non-functions in promise.ensure()
Fix doc typo, add link to Promises/A+ for more info on behavior of then()