Make scalastyle warn when codes exceed the maximum cyclomatic complexity.

Currently, scalastyle errors when codes exceed the maxium cyclomatic
complexcity(currently 10). It's helpful most times but sometimes it
makes code verbose.
Adjust relations between Scala, JavaScript and BSON types.

Currently scala types, JavaScript types and BSON types are not
consistent. This patch adjusts their relations.

There are three kinds of type.
 - JavaScript type: used by rhino engine
 - Scala type: helper type to make scala code
 - BSON type: used by database

And a type 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 engine requests it.

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

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

This patch also adds the example how to use ObjectID.
And this patch also splits AnyRefBSONHandler.write method because it
exceeds the maximum of cyclomatic complexity.
Implement the reference type for DB field.

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

And this patch adds three examples for reference type.