metrics: port helper functions from CC2.x
metrics: port helper functions from CC2.x

Ports several helper functions from the common test library in the
cc-oci-runtime repository, including minor changes to accomodate
differences in the CC3.x environment.

Also reformats code in common library to have consistent whitespace.

Signed-off-by: Brett T. Warden <3c49f16b9d4a3f688e955241c679cb8951e4845a@intel.com>

devimc/tests,chavafg/tests,sboeuf/tests,clearcontainers/tests,bwarden/tests,devimc/tests,MarioCarrilloA/tests,bwarden/tests,chavafg/tests,MarioCarrilloA/tests,clearcontainers/tests,sboeuf/tests