Add confidential-only access to fields

Methods can now have an isConfidential property that indicates that it
cannot be accessed from outside of a self reference. Fields are marked
as confidential by default, and there is currently no way to make them
public.
Implement proper annotation system, add publicity

Previously, annotations were just being evaluated and discarded with no
impact on the program. Now annotations are required to implement a
particular method corresponding to the item they are annotating, and
that method is passed the underlying implementation of the item to
modify at will.

This new system has been used to implement the publicity modifiers
public, confidential, readable, and writable. The former two remove and
add confidentiality respectively, whereas the latter two expose either
the reader or writer of a var. The readable annotation is not a valid
annotation on a def.

The built-in types have been split out into their own module to mirror
the exceptions and publicity modules.
Add annotation processing phase before inheritance

In order to ensure inheritance properties are maintained, annotations
must run after methods are attached to objects but before inheritance
runs. In order to handle this, annotations now run in a separate phase
after every definition has been hoisted, and references to self,
explicit or implicit, is disallowed to avoid observation of mutation of
the object's structures. It is expected that only highly obscure code
will ever encounter this restriction. A number of the annotation tests
have had to remove their annotation constructors in order to satisfy
this new restriction, replacing them with the more standard publicity
annotations.

Certain inheritance mechanisms are now guaranteed by the interpreter,
ensuring that methods cannot be hidden by an override with a
confidential method and type declarations can never be overridden.

The UninstantiatedType exception has been renamed to IncompleteType to
mirror the new IncompleteObject exception.
Improve stack trace reports for new evaluations

Some new features such as annotations were not being logged in the stack
trace when exceptions occurred. The node reporting in the put method has
been abstracted out to work at any point, and is used to report problems
with annotations on a given node.

Requests to types with parameters will now report the request for a type
rather than as a method.
Pass receiver and inheritee to constructors

Previously constructors involved in inheritance did not have access to
both receivers and the inheriting object. Now constructors are passed an
inheriting object as its first argument, and it is null if there is no
inheritance. As a use case of this, the exception refinement methods are
now constructors and may be inherited from.

The takesPart property of methods did not appear to be doing anything,
and has been removed.
Use type aliases names in type asString

Defining a type alias now creates a proxy with a name and uses that
name instead of the structure of the type when using asString. Applying
generics includes those types in the stringification as well. The
built-in types have been updated to include the generic information.

Built-in methods have been split out into a separate module as well, and
a method 'delegateTo' has been added to handle object inheritance.
Add modulo operator to numbers

The modulo operator with % was missing from the set of builtin operators
on numbers. The operator just defers to the JavaScript operator in the
same way as the other binary operators.
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. The two
external interpret methods now also take an optional module path, which
will be used for reporting in case of errors.
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.