Improved validation.

The Validator now checks for conflicting transitions (the same event on
the same state has multiple resulting states) and for duplicate
transitons.