refactor to enum/constants for node types

Replace string references to centralised VirtualNodeType class references. This helps when making changes to
names and types and not repeating string literals in test cases etc.

Tests are passing on this branch
I was just following the style of VirtualPatch (vpatch.js), I did initially go with an object