Ported from rpm5.org work of Jeff Johnson with some differences:
- place into rpmfileutil instead of rpmgi as it's more generic than just rpmgi
- rename rpmgiEscapeSpaces -> rpmEscapeSpaces
- return char *, not const char * as the return string must be freed by caller
- move the checksumming into librpmio
- rename domd5() to rpmDoDigest() with future expansion for specifying
digest algorithm type (ignored for now)
- rearrange parameters to leave return types last
- one less rpmio_internal outside rpmio/, whee...
- used all over the rpm tree, and it knows about handling prelinked files
so potentially useful for outside users, might as well export it
- new public header rpmfilutil.h for collecting this sort of stuff