NEXUS-5906: releaseAfterClose flag added

Mojo changes and IT verifying it

Issue
https://issues.sonatype.org/browse/NEXUS-5906

CI
0xdeadbeef