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

see #826