Make some cleanups to:
- Avoid double map lookups & NPE risk in the keyed-repository checks
- Centralize closed-state logic in checkOpened()
- Trim collection names in validateCollectionName
@anidotnet let me know if I can cleanup the Nitrite.java and contribute to this project. Thanks a lot.