Fix node ordering and allow 0 values within XML

Fix node ordering, as this currently places tmpl-if elements before tmpl-each.

Also prevent '0' values from being removed in tmpl-bind as 0 will intenionally be used in XML at times.