Make scalastyle warn when code exceeds the maximum cyclomatic complexity.

Currently, scalastyle errors when code exceeds the maximum cyclomatic
complexity (currently 10). It's helpful mostly but it makes code verbose in
some cases.
Adjust relations between Scala, JavaScript and BSON types.

Currentlym Scala, JavaScript and BSON types are not consistently used. This
patch adjusts their relations.

There are three kind of types:
 - JavaScript type: used by Rhino engine
 - Scala type: intermediate type used by Scala code
 - BSON type: used by database

The conversion table is:

 JavaScriptType  | ScalaType            | BSONType
-----------------+----------------------+----------------
 NativeObject    | Map[String, AnyRef]  | BSONDocument
 NativeArray     | Seq[AnyRef]          | BSONArray
 NativeNumber    | Int                  | BSONInteger
                 | Long                 | BSONLong
                 | Double               | BSONDouble
 NativeBoolean   | Boolean              | BSONBoolean
 NativeDate      | Date                 | BSONDateTime
 NativeUndefined | Undefined            | BSONUndefined
 NativeFunction  | String               | BSONJavaScript

JavaScript types can be converted to Scala types with Field and Scala types can
be converted to JavaScript types with Context and Scope.  Scala types are
convertible to BSON types and vice versa.  But JavaScript types and BSON types
cannot be converted to each other directly.

ScriptableDocument contains data as BSON Type, and converts to JavaScript type
when the engine requests it.

Scala types seem to be useless because it's not used by engine nor database,
but code becomes complicated without these types because the Rhino engine
automatically converts primitive types with toSource method of Native*.
Add ObjectID wrapper.

Currently, there is no way to find a document with object id.
This patch adds ObjectID wrapper. A user can use this wrapper with
require('db').ObjectID().

This patch also adds examples of how to use ObjectID.
Implement the reference type for DB field.

The purpose of reference field is to reference a document. This field will
store the object id of the document. The getter of a reference type field
returns the future of the document referenced by this field.

And this patch adds three examples of how to use reference type.
Add embedding field.

Embedding field is to store objeect. This type have to be decalred with
a schema option.

See https://github.com/SollmoStudio/beyond/wiki/Beyond-DB-API-Schema for
more information.