Classmethod hydrator optimization

This PR is related to zendframework/zf2#6142, and includes tests for the newly introduced hydration and extraction caches