NEXUS-5906: releaseAfterClose flag added

Mojo changes and IT verifying it

Issue
https://issues.sonatype.org/browse/NEXUS-5906

CI
https://bamboo.zion.sonatype.com/browse/NX-MVNF0