Add validation classes

This reworks how all the `*_node` methods are defined to pull the common patterns of mutation (before/after) and validation out.
Could perhaps do with some tomdoc too, as the expected_class isn't used if you pass a block, but it's not an optional argument either.