Assorted code cleanups
- gitlab CI: stop requiring Signed-off-by in commits
- constify a couple more function arguments
- Mark global variables as static
- Fix -Wshorten-64-to-32 warnings from clang
- Fix -Wsign-conversion warning from clang
- Reduce number of strcmp calls to check directory names for revision control
- Use memmove instead of strcpy for overlapping strings
- Use strlcat and strlcpy if available