Add a factory function create a Response from a JavaScript object.

response.create() converts the given object into a string using JSON.stringify.
Add contentType getter to ScriptableRequest.

Returns the value of the Content-Type header (without the parameters (eg
charset)).
Add bodyAsJsonString getter to ScriptableRequest.

bodyAsJsonString returns the JSON body as a string if the content-type is
either "text/json" or "application/json".
Add secure getter to ScriptableRequest.

secure is true if the client is using SSL.
Convert between BSONValue and JavaScript value with field information.

Currently, ScriptableCollection doesn't consider field type when saving data.
It causes a type error on reading data even when the data is convertable to the
required type.
Support Date type on DB API.

Currently, there is a bug in saving Date type. This patch fixes the bug and
adds an example of saving Date.
Convert to the requested type when reading a document from database.

Currently, ScirptableDocument reads data only if the saved data type is exactly
the same to the specified type in schema. This patch makes ScriptableDocument
convert the data to a compatible type if possible.
Implement remove and removeOne method of ScriptableCollection.

And add examples.
Implement Authenticated.

There is no reason to use actor for UserAction because most of the
hard works handled by UserAction are moved to GamePluginWorker
and UserAction is just used to filter logged-in requests.

UserActionActor will be removed in the next patch.
Replace UserAction with Authenticated.
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.
Change the Response constructor to handle both string and object argument type.

Currently, Response takes only string argument. Thus, response.create() is used
to create a Response with an object. This patch removes response.create() and
changes the Response constructor to handle both string and object argument
type.