COMMON,UNIT_TEST: Utility functions to convert from timespec string to timespec struct and nanoseconds