EZP-21625: loadRelations() does not check if given VersionInfo is about currently published version

This PR fixes issue https://jira.ez.no/browse/EZP-21625

Added check for published version with integration test.
REST tested manually.