GTTF: Clean up DownloadFileManager

This removes a lot of duplication, locking, and thread jumping.

Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.

There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.

Hopefully, this is http://codereview.chromium.org/3245005 done right.

TEST=unit_tests, browser_tests, ui_tests
BUG=48913

Review URL: http://codereview.chromium.org/3347018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59139 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index d63edc0e6..726f491 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -38,6 +38,7 @@
   }
 
   ~DownloadManagerTest() {
+    download_manager_->Shutdown();
     // profile_ must outlive download_manager_, so we explicitly delete
     // download_manager_ first.
     download_manager_ = NULL;
@@ -179,7 +180,7 @@
 class MockDownloadFile : public DownloadFile {
  public:
   explicit MockDownloadFile(DownloadCreateInfo* info)
-      : DownloadFile(info), renamed_count_(0) { }
+      : DownloadFile(info, NULL), renamed_count_(0) { }
   virtual ~MockDownloadFile() { Destructed(); }
   MOCK_METHOD2(Rename, bool(const FilePath&, bool));
   MOCK_METHOD0(DeleteCrDownload, void());