Do not convert to NativeObject if it is a primitive type.

Currently, each field type of Document is always 'object' instead of the
expected type (e.g., 'string', 'number' and 'boolean') because
ScriptableDocument converts it to NativeObject.

This patch makes ScriptableDocument return the primitve type with no
conversion.  Rhino engine will automatically convert Number, Boolean and String
because BeyondContextFactory set javaPrimitiveWrap to false.
Don't share emptyUpdatedValueTable across multiple ScriptableDocument.

Currently, ScriptableDocument's updateValues field accidentally shares a
single UpdatedValueTable because emptyUpdatedValueTable is a singleton defined
in ScriptableDocument's companion object. Move it to ScriptableDocument class
so that each ScriptableDocument instance has its own UpdatedValueTable.

Also move UpdatedValueTable type to ScriptableDocument class because it is used
only within ScriptableDocument class.
Expose objectID as objectId in JavaScript.

Follow the mongo shell's naming convention.
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
more information.