Fixed various instantiation Bugs, Implemented appendChild on top of that.

Hi Craig,
thanks for your initial gumbo binding. I tried to implement appendChild and found some bugs regarding "instances" of Node / Element and so on. In the upstream version they all share the same attributes and childNodes tables which leads to infinite recursion when creating a new element and inserting it (because this implicitly creates a self-reference). After fixing that and adding some tests to the test suites I implemented a first version of appendChild on top of that.
Checked with lua and luajit.
Please review and pull if you find the additions appropriate.