updateGroupsAndPriv: fix bugs and add tests

This commit adds a unit test for the |updateGroupsAndPriv| function.
Thanks to the test case, I found a bug that the exsting codes don't
updat the groups and privilege of the user after updating.

Added several neccessary functions to add unit test and fix bugs.

Tested: unit test passed.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ifcf88505f10b6bfdcca2de31a29ce055153463e8
diff --git a/users.hpp b/users.hpp
index 77a1079..3541625 100644
--- a/users.hpp
+++ b/users.hpp
@@ -71,6 +71,10 @@
      */
     std::string userPrivilege(std::string value) override;
 
+    void setUserPrivilege(const std::string& value);
+
+    void setUserGroups(const std::vector<std::string>& groups);
+
     /** @brief lists user privilege
      *
      */