Refactor: Fix issues found by cppcheck

Resolve several issues found by cppcheck:

    [msl_verify.hpp:28]: (style) Class 'MinimumShipLevel' has a constructor with 1 argument that is not explicit.
    [ubi/watch.hpp:21]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
    [item_updater_main.cpp:22] -> [item_updater_main.cpp:49]: (style) Local variable rc shadows outer symbol
    [serialize.cpp:19]: (performance) Function parameter 'versionId' should be passed by const reference.
    [ubi/watch.hpp:43]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit.
    [serialize.cpp:52]: (performance) Function parameter 'versionId' should be passed by const reference.
    [serialize.cpp:116]: (performance) Function parameter 'versionId' should be passed by const reference.
    [activation.cpp:115] -> [activation.cpp:152]: (style) Local variable mapperResponseMsg shadows outer symbol
    [version.hpp:114]: (performance) Variable 'eraseCallback' is assigned in constructor body. Consider performing initialization in initialization list.
    [image_verify.hpp:53]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit.
    [ubi/item_updater_ubi.cpp:192]: (performance) Function parameter 'versionId' should be passed by const reference.
    [ubi/item_updater_ubi.cpp:203]: (performance) Function parameter 'versionId' should be passed by const reference.

Tested: Verify the code compiles and cppcheck does not report the above
        issues.

Change-Id: I096392a2a7a283fe198c9c29185125e61295e10f
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/ubi/serialize.hpp b/ubi/serialize.hpp
index e8860f3..e5fefad 100644
--- a/ubi/serialize.hpp
+++ b/ubi/serialize.hpp
@@ -13,19 +13,19 @@
  *  @param[in] versionId - The version for which to store information.
  *  @param[in] priority - RedundancyPriority value for that version.
  */
-void storeToFile(std::string versionId, uint8_t priority);
+void storeToFile(const std::string& versionId, uint8_t priority);
 
 /** @brief Serialization function - restores activation information from file
  *  @param[in] versionId - The version for which to retrieve information.
  *  @param[in] priority - RedundancyPriority pointer for that version.
  *  @return true if restore was successful, false if not
  */
-bool restoreFromFile(std::string versionId, uint8_t& priority);
+bool restoreFromFile(const std::string& versionId, uint8_t& priority);
 
 /** @brief Removes the serial file for a given version.
  *  @param[in] versionId - The version for which to remove a file, if it exists.
  */
-void removeFile(std::string versionId);
+void removeFile(const std::string& versionId);
 
 } // namespace updater
 } // namespace software