HHH-8683 EntityEntry backport on master

Hey @gunnarmorling and @sanne
I had to make a few adjustments to port it to master, can you double check it.
(new pull request on the correct repo)
Actually I don't think it would blow up.

My main problems are:
- are you guaranteed to use the same implementation across all nodes?
- if not then we need a way to store the impl in the serialised content (how)
- is the ois state stable across implementation, should we write it down in the JavaDoc?? What about evolutions?