Make it possible to create a Future from scala.concurrent.Future.

This patch is preparation for collection methods(map, filter, recover,
transform, etc.) of JavaScript Future API.
Implement map method of JavaScript Future.

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

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

Create a new successful future with the 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 a function that returns a future. The result is the
future returned by the function.
Implement transform method of JavaScript Future.

Create a new future. This method takes two functions, the first function is
applied when the current future is successful, and the second function is
applied when the current future is failed.
Pass only the exception value in failure callback when the exception is RhinoException.

Currently, a failure callback receives a concatenated string with the exception
value and the file info where the exception occurs, because ScriptableFuture
calls the failure callback with Throwable.getMessage.

This patch makes ScriptableFuture pass RhinoException.details.