Add mapTry method to Future

The mapTry method generalises map, transform and recover.
Add flatten method to Future