Fixes addition of multiple objects to singular references

* For the addition of children to references, the ASTNode addLastChild
  method has been used, which will simply add the child. This is
  inadequate if the child setter method is called more than once.

* Adds setChild method to ASTNode which removes existing child references
  before adding the new one
WIP
WIP2