Add load function to BeyondShellGlobal.

load is defined as a JavaScript function which loads and execute a set of
JavaScript source files.
Install require unconditionally.

Currently, require is installed only after loading the main script. Change the
behavior to install require unconditionally so that JavaScriptShellConsole can
use require.

This patch also changes BeyondJavaScriptEngine to take plugin paths as an
argument because JavaScriptShellConsole can't access
BeyondConfiguration.pluginPaths.
Add util.format API.

util.format supports the same format as node.js.
The callback function of replace is copied from node.js.
See https://github.com/joyent/node/blob/master/lib/util.js

This patch also adds plugins/lib to the plugins path.
Add console library.

console has five methods for logging: log, info, warn, debug and error.

In Rhino, these methods must be implemented with variable length arguments. But
this is not possible in Scala because Scala implements variable length
arguments with Seq which is not compatible with Rhino.

To circumvent this limitation, changed console to pass a string after
performing format conversion in JavaScript.
Add event.track API.

This API is for logging game events in JavaScript.
The first argument is tag, and the remaining arguments are messages.

Messages are logged in one of the four form:
 - Object -> message itself.
 - Non-object message -> { "message": message }
 - Multiple messages -> { "message": [ message1, message2, ... ] }
 - No messages or message are null or undefined -> {} (empty object)
Make GameEvent print tag name.