Enable encoding/decoding object paths

Any string used to form a Dbus object path needs to be encoded.
This commit enables encoding the User Name before using it in the
Object path and enables decoding while converting it back to User
Name to display to the user.
This commit replaces string computation of User Name with
object_path.filename() function which decodes and gives the User
Name string.

Tested:
 - ipmitool user set name "_test_123"
 - Successfully created /xyz/openbmc_project/user/_test_123
   Object Path
 - ipmitool user list 3
   Displayed the user _test_123

 - busctl call xyz.openbmc_project.User.Manager
   /xyz/openbmc_project/user xyz.openbmc_project.User.Manager
   CreateUser sassb _test_6566 4 "ipmi" "redfish" "ssh" "web"
   priv-admin true
 - Successfully created /xyz/openbmc_project/user/test_6566
   Object Path
 - ipmitool user list 3
   Displayed "_teste66" which implies successfull decode of
   object path.

Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Change-Id: I75d479cfa4888c5db31ae551bdcc504106bf25fa
1 file changed