[libccnet] cleanup helper functions to avoid name conflicts

* Copy code of lib/utils.c used by libccnet to lib/libccnet_utils.c and rename
their names to ccnet_util_XXX, to avoid name conflicts with other libs
such as libseafile_common