Allow callable class names

To provide an easy way to customise the class used based on contextual data I've updated the `$className` variable to be either a `string` or `callable`. A shared method is used between the existing hydrators to return the hydratable class name.
Arrays have some sort of invocation method which means this isn't an issue.