Add Future.sequence function.

sequence transforms an array of Futures into a Future of the array.
Useful for reducing manu Futures into a single Future.
Add Future.firstCompletedOf function.

firstCompletedOf returns a new Future to the result of the first future in the
list that is completed.
Reimplement future.successful.

The current implementation is inefficient because it actually schedulea a
Future though it simply returns the passed value. Use Future.successful which
creates a completed Future with the specified result.
Add missing semicolons.
Change the result type of ScriptableCollection.save() to ScriptableFuture.
Implement setter function for ScriptableDocument.

A setter function of ScriptableDocument sets the value and returns
the document itself.

If a document has a field named someField, there will be a function
named someField. This function can be used in two ways:
- Get the value of someField when called without an argument.
- Update the document with the changed someField when called with one
  argument.

This patch also renames currentValueInDB to the plural form.
Implement ScriptableCollection.save().

This method updates the document.
Add type annotation to ScriptableFuture.executeCallback.

Omitting the return type of executeCallback makes it hard to read code.
Change Console log functions to static.

By changing the prefix to jsStaticFunction_, these functions become the
properties of Console constructor. Then there is no need to create a Console
object because we can call Console.log or Console.info directly without
creating a Console object.