Add a system prelude with control structures

The prelude file in src/prelude.grace will now be used as the base
prelude definition of any module, though this can now also be customised
through the library interface. As usual, dialects override this new
prelude. The current prelude just holds some standard control
structures.

The module loading has been split off into its own module. This is
ignored for loading the prelude, which will use brfs to embed the
prelude file when generating the browser code.
Convert native objects when calling native code

Rather than having to manually convert builtin objects to their native
representation when invoking JavaScript functions, the lookup function
will generate a wrapper when it detects a JavaScript function that does
this automatically. This is handled by implementing an 'asPrimitive'
function which returns whatever the native representation of the object
is. Note that the existing asPrimitive* functions still exist, and some
builtin objects now implement multiple variants.

This change also tidies up the number type to include the builtin binary
operators.
Rename the raiseMessage() method to raise()

The shorter form of raise should be the one that takes a message, so
raiseMessage() has been renamed to raise(). The existing raise method
has been renamed to raiseDefault.
Adjust variable lookup and method overriding

A full variable lookup will search all scopes and every self value in
scope if a definition cannot be found in the immediate scope or self
value, and an ambiguity error occurs if multiple definitions are found.

Variables are no longer permitted to override methods in a super-object.
This avoids tricky situations where code that relies on variables having
values can be broken by an overriding variable.
Tidy up builtin boolean and list definitions

The andAlso() orElse() method has been relegated to short circuiting
booleans only, and replaced by the ifTrue() ifFalse() method and
companions ifTrue() and ifFalse(). Due to the issue with infinite
recurion on assertions, both ifTrue() ifFalse() and orElse() are both
untyped.

The doForEach() method on lists has been renamed to just do(). A 'Do'
type has been added to the prelude and the method for() do() has been
implemented as an associated control structure.
Move the prelude into the runtime

The prelude module is now in the runtime directory, and is exported by
the runtime module rather than directly imported by the main module.
Convert primitive values for getters and setters

Grace objects were converted back and forth from primitive
representations when calling out to JavaScript code, but only in
functions. Now getters and setters on JavaScript objects will also
perform a conversion before setting a value and after getting a value.

This commit also includes a minor change to the types that renames the
erroneously named 'Any' type to 'Object'.
Add names to invalid type error details

When multiple methods with the same name appeared in the same type, the
error message did not include the name of the duplicate method or the
name of the type if it appeared in an alias. Now alias names are
included in error stack traces and the InvalidType error are raised with
the name of the method which appears more than once.
Uglify name when retrieving method for annotating

Multipart method names were not uglified before being retrieved when
processing annotations, causing an internal error. Now the correct
method is retrieved. Additionally, the searches through local self and
scope in this and several other cases were redundant, and only the
direct scope is searched instead.
Yield tasks every 10ms instead of every apply

In order to avoid potential stalls when processing large chunks of code
with no method requests, yielding to the event loop now occurs directly
inside of the task mechanism once 10ms has passed since the last yield.
This should produce more consistent yielding, though it's not yet clear
what the performance penalities are for constantly checking the time.

The Task API is now exported by the main hopper module.
Taskify portions of the parser, making it async

The larger parts of the parser are now asynchronous, using the Task API.
This means that the parser will also be non-blocking. It should also
ease a transition to a token stream rather than manually splitting
tokens synchronously. The token operations remain synchronous for now.

The callback method on tasks can now handle undefined and null values,
and the prelude will report its module name if an error occurs.
Add a stop method to halt a chain of tasks

It is now possible to stop an executing task and its dependencies by
calling the stop method. This method has no effect on completed tasks,
but will cause currently pending tasks to be rejected with an
InterruptError. Use of stop propagates down a chain of tasks, stopping
all dependent tasks. There are no guarantees as to how quickly all tasks
will be stopped, and the method will not stop concurrent tasks that were
spawned by, but are not in, the dependency chain.

The external interpreter methods now each return a function that can be
used to stop the underlying task.
Modify outer semantics to search all of scope

The outer semantics have been changed to work like super, where outer
may only appear as the receiver of another request. Outers can no longer
be chained, and ambiguities must be resolved by naming outer objects.
Tidy up inheritance and super semantics

The use of self inside an inherits request is now banned, with the same
Incomplete Object error that occurs when referencing it in annotations,
as the 'object' property on the scope is maintained when the first node
of an object body is an inherits clause. The processing of the clause
tidies up the property instead. A few other superfluous properties have
also been removed.

The rules for processing super requests are now more liberal, and they
may now appear outside of the method they are requesting. In all cases
use of super will resolve to the first method defined above the current
inheritance level, or an error if no such method can be found. This is
achieved by storing the existing definitions on the object at the moment
the inherits clause is encountered. A number of tests have been
introduced or changed to test this comprehensively.