WIP [NX-525] shared database support

https://issues.sonatype.org/browse/NX-525

also addresses:
https://issues.sonatype.org/browse/NEXUS-6698
https://issues.sonatype.org/browse/NEXUS-6619
I found LocalTestDatabaseManager handy when I wanted to examine the state of the db with the orient console if a test failed. Got a suggested alternative?