Work around infinite nesting while working with Doctrine entities

While using `zf-apigility-doctrine` and certain (mostly bidirectional) Doctrine entity associations, `zf-hal`'s method of rendering entities can cause infinite nesting (Doctrine keeps on giving). I've added a depth gauge as to prevent just that. A `max_depth` configuration key can be added to a class' `metadata_map` key that need their rendering to be limited in such a way.