Fix clang-tidy performance warnings in system/security.

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

Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I3b9383f34e466ca6b5290bad802d535443fd0187
Test: build with WITH_TIDY=1
5 files changed
tree: 988c4c8cffc21c0eb3f25345b7a6dc409f84dbb7
  1. keystore/
  2. keystore-engine/
  3. softkeymaster/
  4. MODULE_LICENSE_APACHE2
  5. NOTICE