Create abstract class structure for rules.

In order to generalize hide the concrete implementation of a rule
validator it is necessary to create an abstract class structure
generalizing this behaviour. This is done for every validation handler and
every rule factory with this commit.