Implement macros.

Adds a new function, expandMacros, to the ASTNode type, which returns
the node after having expanded macros. A node is returned because the
type of the node may change, and so this needs to be accounted for.
Initially I was going to add a "passthrough" node type, but that would
have made the AST messy. Default simply recursively expands macros in
children, only MacroNode does something fancy.

There is potential for infinite macro loops, as macros being expanded
can cause other macros to be expanded. This is ok because it's what the
original did, but it might be worth adding a depth limit.