Fix const correctness issues

cppcheck correctly notes that a lot of variables in the new code can be
const.  Make most of them const.

Tested: WIP

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8f37b6353fd707923f533e1d61c5b5419282bf23
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 0e2af70..d0bc29c 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -2340,7 +2340,7 @@
                     nlohmann::json& propertyItem = propertiesObj[name];
                     crow::connections::systemBus->async_send(
                         m, [&propertyItem,
-                            asyncResp](boost::system::error_code& e,
+                            asyncResp](const boost::system::error_code& e,
                                        sdbusplus::message::message& msg) {
                             if (e)
                             {
@@ -2420,7 +2420,7 @@
                 std::sort(names.begin(), names.end());
                 asyncResp->res.jsonValue["status"] = "ok";
                 auto& objectsSub = asyncResp->res.jsonValue["objects"];
-                for (auto& name : names)
+                for (const auto& name : names)
                 {
                     nlohmann::json::object_t object;
                     object["name"] = name;