generator xml, template rewrite

Rework the code generator to simplify xml unmarshaling and move unique
processing like go keyword detection/replacement to one function.
Switch out the code generation backend to use the template library.

The goal is to swap out the architecture while generating the same
(nearly identical) code.
Implement wayland object binding detection

reference:
http://ppaalanen.blogspot.com/2014/07/wayland-protocol-design-object-lifespan.html