Sort scriptable classes array in BeyondGlobal.scala

To avoid conflict in the future.
Use ScriptRuntime to get Array[Byte] in ScriptableCrypto.

A JSArray element can't be casted to Array[Int] directly.
Move the default encoding to BeyondConfiguration.

Encoding would be used quite often in the future, so it'd be
better to have one shared configuration here.
Implement ScriptableBuffer.

ScriptableBuffer is an implementation of `Buffer` class in Rhino.
It basically provides methods to manipulate buffers with String and
Byte. An example code representing the usage of the class is also
added in the `examples` directory in plugins.
Add findOneAndRemove method to DB API.

This method is the same as findOne except it also removes the document.
However, we can't implement findAndRemove because ReactiveMongo driver supports
the command only for one document.
Add a sbt task to run JavaScript console.

The task launches JavaScriptShellConsole in beyond.tool.
Add orderBy option to find method.

This patch adds orderBy option to find method. Now you can use find
method like below:

collection.find(query, { orderBy : { field1: db.ASC, field2: db.DESC } })

It will return the sorted result (applying field1 ASC first and applying
field2 DESC in the set that has the same field1).

Parsing orderBy option seems too difficult to read because of backward
compatibility. As before, the second argument will be used as the limit number
if it is a number. And the second argument will be used as find option if it
is a JavaScript object. If you want to use orderBy and limit option at the
same time, use it as in the following:

collection.find(
    query,
    { orderBy: { feild1: db.ASC, field2: db.DESC }, limit: 10 }
)