Make collection.save method return a Future of the saved document on success.

Currently,  save method returns a Future of LastErrorMessage. But the updated
document is needed in most cases.

This patch makes save method return a Future of the saved document on success.
Change the behavior of ScriptableFuture.andThen.

Change andThen to do exactly the same thing as flatMap except it does not pass
the result of this future to the andThen callback. andThen will be used only
for sequencing.
Rename ObjectID to ObjectId.

ObjectID class is exposed to JavaScript, so it is better to follow the mongo
shell's naming convention to avoid confusion.
Extend newObject and newArray methods of Rhino Context.

Currently, arguments must be wrapped in an array when using newObject
and newArray method. It makes code verbose.
Refactoring code to use ContextOps.

The previous patch impelents ContextOps to extend newObject and newArray
methods. This patch makes code use ContextOps.
Make ObjectId support JSON.stringify.
Add array type field.

See https://github.com/SollmoStudio/beyond/wiki/Beyond-DB-API-Schema
for further information.
Support optional field for DB schema API.

Currently, if there is an undefined field when inserting a document, the
document cannot be saved.

This patch makes ScriptableDocument support the optional field for DB schema.
Support default field for DB schema API.

A field with default value can be null when inserting a document. The default
value is not saved in DB, it will used on read.
Add parse() to ScriptableUUID.

parse creates a UUID from the string representation.
Implement ScriptableFileSystem.

It's an interface to provide JavaScript API for handling file system.
Now only basic functions are implemented to read and write files.
The API design is found in the Wiki page below.

https://github.com/SollmoStudio/beyond/wiki/Beyond-File-System-API
Add ScriptableFile.

ScriptableFile is a wrapper of Java File class for Rhino. Currently, only
`name`, `path`, `isFile` and `isDirectory` getters are implemented.
Implement `readdir` method for file system API.

`readdir` API reads all files from a provided directory path, and return
a future object of an array of ScriptableFile objects.

The method name and API design follow Node.JS's with a little change in
its result to make it fit in well with Java File API.
Implement ScriptablePath.

ScriptablePath implements a missing `path` module of JavaScript. It has
the same API with one of Node.js.
Move ScriptableRequest and ScriptableResponse to beyond.engine.javascript.lib.http package.
Get rid of actors from GamePlugin.

We don't get much benefits from using actors in GamePlugin implementation.
Using Future is more functional and eaiser to compose.

This patch broke JavaScript timer functions such as setInterval and setTimer.
A follow-up patch will fix this.
Get rid of JavaScript timer functions.

setTimer and setInterval are rarely used. Actually, these functions should not
be used in handler functions because scheduling multiple timers at the same
time has a negative impact on performance. Because the philosophy of Beyond is
to systematically discourage bad programming idioms, I think it's better to get
rid of JavaScript timer functions entirely.
Remove timer function names from BeyondGlobal.

Forgot to remove timer function names in
aec99b65d7a38b9b3fc11cc39adcabee848ee9ee.
Remove JavaScriptConsoleProvider.

JavaScriptConsoleProvider unnecessarily complicates code. Use a unified
implementation in ScriptableConsole and get rid of JavaScriptConsoleProvider.
Extract scriptableClasses an an array.

Don't repeat ScriptableObject.defineClass for each sciptable class. Extract
scripable classes as an array and call ScriptableObject.defineClass for each
class.