SOFTHSM-70: Improved DB handling, part2

Fix memory leak in the tests. The ByteStrings need to be destroyed before we end the test program. The ByteString object is using SecureMemoryRegistry and the MutexFactory which has been destroyed before the test class is cleaned up.

Remove unused functions. Also, the SQLite functions are for embedded systems.