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)
`DefaultEntityEntryExtraStateHolder`? Or is it supposed to be used by other EE implementations as well?