Make a templated derived class _Node

Every node should be a child of _Node (rather than Node).

This means every type of node has an associated enum and we can
check during serialiation that all of the enums are covered
(with a switch statement).
Make getType purely virtual to force classes to derive from _Node