Fix incorrect mock of getRowsHash in BeEntityContextSpec

Switch out for concrete implementation of the TableNode since it is a
simple class and to avoid issues with incorrect allocation of nodes in
future.
Provide factory manager to entity factories so they can get relations

Entities often need to access other instance types as relations
/ associations on the main entity. Now we pass the factory manager
into each entity factory to make it simpler to create related
instances.