Allow state change STATE_PARENT_FAILURE -> STATE_PARENT_FAILURE

In cases where repeated intgerated smoother updates have the same realisation(s) failing the target case will get the state transition STATE_PARENT_FAILURE -> STATE_PARENT_FAILURE.

This PR will allow that transition - and also the allowed transition have been factored out in an exported function for better testing.