Make JavaScript Future create with scala Future.

This patch is preparation for functional methods of JavaScript Future
API.
Implement map method of JavaScript Future.

This method takes unary function and returns new future with the given
function. If the original future is failed new future will contains the
original exception. And if the given function throws exception, it
returns the failed future.
Implement filter method of JavaScript Future.

Create a new filtered future. If condition returns false or something
except boolean, the new future becomes failed.
And the new future becomes failed when the current futre is failed,
Implement recover method of JavaScript Future.

Create new successful future with given callback when the current future
is failed. And if the current future is successful the new future
contains the same result as the current future.
Implement flatMap method of JavaScript Future.

Similar to map but it takes function that returns future and the result
is the future returned by the function.
Implement transform method of JavaScript Future.

Create new future. This method takes two function, the first function is
applied when the current future is successful and the second function is
applied when the current future is failed.