[ledger] do not keep a fd for the page's directory

With the switch to FIDL IO, the leveldb environment does not need ledger
to keep the file descriptor to the root directory open. Page opening is
not limited by file descriptors anymore.

TEST=reenabled get_page/add_many_pages benchmark

LE-524: #done
Change-Id: I647eb41e7fe2c1808b720fa14b40b41d41023779
diff --git a/bin/ledger/storage/impl/leveldb.cc b/bin/ledger/storage/impl/leveldb.cc
index c649ad9..95ae61d 100644
--- a/bin/ledger/storage/impl/leveldb.cc
+++ b/bin/ledger/storage/impl/leveldb.cc
@@ -189,11 +189,12 @@
     FXL_LOG(ERROR) << "Failed to create directory under " << db_path_.path();
     return Status::INTERNAL_IO_ERROR;
   }
+  fxl::UniqueFD unique_fd;
   ledger::DetachedPath db_path = db_path_;
   if (db_path_.path() != ".") {
     // Open a UniqueFD at the db path.
-    unique_fd_ = db_path_.OpenFD(&db_path);
-    if (!unique_fd_.is_valid()) {
+    unique_fd = db_path_.OpenFD(&db_path);
+    if (!unique_fd.is_valid()) {
       FXL_LOG(ERROR) << "Unable to open directory at " << db_path_.path()
                      << ". errno: " << errno;
       return Status::INTERNAL_IO_ERROR;
diff --git a/bin/ledger/storage/impl/leveldb.h b/bin/ledger/storage/impl/leveldb.h
index c788f46..4fe2283 100644
--- a/bin/ledger/storage/impl/leveldb.h
+++ b/bin/ledger/storage/impl/leveldb.h
@@ -8,7 +8,6 @@
 #include <utility>
 
 #include <lib/async/dispatcher.h>
-#include <lib/fxl/files/unique_fd.h>
 
 #include "leveldb/db.h"
 #include "leveldb/write_batch.h"
@@ -54,7 +53,6 @@
   const ledger::DetachedPath db_path_;
   std::unique_ptr<leveldb::Env> env_;
   std::unique_ptr<leveldb::DB> db_;
-  fxl::UniqueFD unique_fd_;
 
   const leveldb::WriteOptions write_options_;
   const leveldb::ReadOptions read_options_;
diff --git a/bin/ledger/tests/benchmark/BUILD.gn b/bin/ledger/tests/benchmark/BUILD.gn
index ae2edb9..8cf9355 100644
--- a/bin/ledger/tests/benchmark/BUILD.gn
+++ b/bin/ledger/tests/benchmark/BUILD.gn
@@ -107,10 +107,9 @@
 
     {
       path = rebase_path("get_page/add_many_pages.tspec")
-      dest = "DISABLED_add_many_pages.tspec"
+      dest = "add_many_pages.tspec"
     },
 
-
     {
       path = rebase_path("get_page/add_new_page_precached.tspec")
       dest = "add_new_page_precached.tspec"