Refactor Validator.

Move all name changes caused by validation to Validator class. This means we no longer need the ValidationException class.

Simplify Validator class methods. There is no need to separate class/operation/etc. validation from name validation.

Added methods to validate constant and attribute names.