Expand the test autoloader with an additional autoloader

This so that mocks can be kept out of the source.
Validator Chain test cases
Added Test Cases for the Public Key Validation, fixed logic accordingly

As I was adding test cases for the public key validation various
issues arose, the causes have been resolved.
Furthermore some changes in design have been made to allow
for more testable code