utils_misc: Add a function to normalize the data size

Normalize a data size in one order of magnitude to another (MB to GB,
for example). In this function you can also change the factor as you
need, the default factor is 1024.

changes from v1:
  - rename the function and variables
  - update the method for getting a fraction.
  - Add unittests

Signed-off-by: Yiqiao Pu <ypu@redhat.com>