Futures, promises, tries, oh my!

Note: the functions accepted by map and flatMap are contravariant in their
argument type but not covariant in their return type. For whatever annoying
reason, GWT seems to have trouble turning a Foo<? extends Bar> into a Foo<Bar>.
Yay for multiple Java compilers and multiple buggy implementations of Java's
generic type system.