Add class to AST and hoist appropriately

As the creation of a class object is side-effect free, it is safe to
evaluate it immediately, allowing it to be used prior to its definition
in the same way as methods. As such, classes are now a separate entity
in the AST rather than being parsed as sugar, and have a similar
interface to methods. The interpreter code for methods has been expanded
slightly to handle the different meaning of the class body.

Signatures are now also represented as an AST node rather than as a
native list, allowing them to generate their own name and toString
representations.
Hoist methods and variables before types

Because type declarations were hoisted before methods and variables, use
of methods and variables in types produced an UnresolvedRequest despite
the definitions being in scope. Now methods and variables are hoisted
first, which is side-effect free, and types may use methods so long as
those methods do not use the type (otherwise an UninstantiatedType error
occurs). Using variables in types is still guaranteed to produce an
error, but it will now produce the more sensible UndefinedValue rather
than UnresolvedRequest.

Note that variables are not hoisted in a non-object body, so this
remains a problem there. It's not clear if there is a solution to this
problem other than not hoisting type declarations in that circumstance.