as: re-factor AST insertion to be O(1).

The AST is just a linked list. Before, we had to traverse the list
until the end to insert a new item (O(n)). Now, we keep a pointer
to the last item in the list. This makes insertion O(1) -- with 20
less lines of code to boot.