Change scope stack to linked list

The existing scope stack using an array was inefficient, as it would
clone the whole stack every time it needed to save it. Now the scope
stack is represented as a linked list, and cloning the interpreter just
preserves the pointer rather than cloning the whole list.
Change signature documentation type syntax

The JavaScript signature documentation now features a more specialised
syntax for lists and callbacks, given how common they are.