Update code to work in HHVM
Update code to work in HHVM

- HHVM does not allow using Traversables in `array_walk` invocations.
  Changed to a foreach loop, which allowed reverting the visibility on
  `injectPropertyAsLink`, and made the latter function recursive.

Wilt/zf-hal,vixriihi/zf-jsonld,nobesnickr/zf-hal