Add a ProxyFactory for getters

Now all getters should return the same proxy if their namespace, config_key, default and validation are the same.

Also cleaned up some tests which lacked proper mocking.

Resolves #46