Rewrite Future implementation for clang 3.3

Clang 3.3 fails to treat function-local classes correctly.