Flushing new collections

this includes and fixes https://github.com/doctrine/phpcr-odm/pull/477, https://github.com/doctrine/phpcr-odm/pull/480 and https://github.com/doctrine/phpcr-odm/pull/483

there might still be room to simplify code here but some of the simplifications I have already done have this feeling like they could cause issues in edge cases.
we do not throw the same exception message. but the logic is similar yes .. but not sure how to sensibly not have this duplicate code