Keystore 2.0: Revise database.

* Make grants persistent.
* Moved some utility functions to db_utils.rs.
* KeystoreDB::new() now takes a path argument that indicates where the
  the database files are to be expected.
* A new test module test::utils.rs introduces TempDir which creates a
  new temporary directory that is cleaned up with all of its content
  when the TempDir opject is dropped.

Test: keystore2_test
Change-Id: I056c404fd9d592ddc8b531394b1c6cc17a0fd736
7 files changed