[#826] Make Promise.{flat,}map allow supertypes
Merge pull request #1998 from baloo/improvements/826-Promise.flatMap

[#826] Make Promise.{flat,}map allow supertypes