Fix style errors.

error file=/home/sloan/workspace/beyond/core/app/beyond/engine/javascript/lib/ScriptableConsole.scala message=If block needs braces line=21 column=4
error file=/home/sloan/workspace/beyond/core/app/beyond/engine/javascript/lib/ScriptableConsole.scala message=If block needs braces line=30 column=4
error file=/home/sloan/workspace/beyond/core/app/beyond/engine/javascript/lib/ScriptableConsole.scala message=If block needs braces line=39 column=4
error file=/home/sloan/workspace/beyond/core/app/beyond/engine/javascript/lib/ScriptableConsole.scala message=If block needs braces line=48 column=4
error file=/home/sloan/workspace/beyond/core/app/beyond/engine/javascript/lib/ScriptableConsole.scala message=If block needs braces line=57 column=4
Change message to val instead of var.
Fix bugs when saving the document with no change in data.

Currently, ScriptableCollection.save method requests update of the document
even though there is no changed data. It causes no error on Linux, but causes
an error on Mac OS X.

This patch makes ScriptableCollection.save method requests update only when
there is a change in data.
Make ScriptableQuery handle ScriptableObjectId.

Currently, ScriptableQuery cannot handle ScriptableObjectId because it uses
AnyRefBSONHandler directly. We need to make AnyRefBSONHandler handle
ScriptableObjectId or make ScriptableQuery change ScriptableObjectId to
ObjectId before using AnyRefBSONHandler.

I chose the second option because AnyRefBSONHandler is used by
ScriptableDocument with convertJavaScriptToScalaWithField method.
ScriptableObjectId is not passed to AnyRefBSONHandler in this case.
Remove unused imports.
Use type matching instead of extractor in convertJavaScriptToScalaWithField method.

Extractor makes code verbose in this case.
Add validations field on schema.

Currently, only min/max validations for numeric values are implemented.
Validate before save and insert of document.