MODE-2293 Removed MapDB as a standalone module and converted it to a local resource

In addition to the description, this PR contains another couple of commits:
1) some fixes & unit test additions
2) a fix for MODE-2245 (web-explorer WF security) which was incomplete & not working correctly.