Persistend/rebind: testing fields reffing entities
Fix rebind, with strongly-typed field for entity

- In rebind's two phase deserialisation, the first phase uses
  returns for entity/location instances a dynamic proxy instance
  (because first phase is to find out which entities are needed,
  and their types).
- Previously that was returning a proxy of type Entity. If that was
  assigned to a field of type ActiveMQBroker then you'd get a
  ClassCastException.
- Now we also pass in the specific type, so the dynamic proxy can
  implement it.
Merge pull request #1232 from aledsage/tests/persisting-obj-reffing-entity

Persistend/rebind: testing fields reffing entities