Fix clang-tidy performance warnings in update_engine.

* Use const reference type for parameters, local variables,
  and for-loop index variables to avoid unnecessary copy.
* Convert some for-loops to for-rang loops.

Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I78996b3f799639fc57ced45e110807625be7dcce
Test: build with WITH_TIDY=1
diff --git a/payload_generator/fake_filesystem.cc b/payload_generator/fake_filesystem.cc
index c765286..234e2f6 100644
--- a/payload_generator/fake_filesystem.cc
+++ b/payload_generator/fake_filesystem.cc
@@ -39,7 +39,7 @@
 }
 
 void FakeFilesystem::AddFile(const std::string& filename,
-                             const std::vector<Extent> extents) {
+                             const std::vector<Extent>& extents) {
   File file;
   file.name = filename;
   file.extents = extents;