misc: Add string utility functions.

It's more readable to write "M_StringEndsWith(..." than doing a bunch of
pointer arithmetic, and this is a common pattern. Also add
M_StringStartsWith, M_StringJoin and M_StringCopy. The latter is a
safe alternative for strcpy() that works the same as OpenBSD's
strlcpy(). Use these functions in a few places where it makes sense.
misc: Add M_StringConcat.

Just as M_StringCopy behaves the same as strlcpy(), M_StringConcat
behaves the same as strlcat(). Use this in one location.
Fix erroneous call to M_StringJoin
doom: Eliminate use of unsafe string functions.

Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
heretic: Eliminate use of unsafe string functions.

Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
heretic: Eliminate use of unsafe string functions.

Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
misc: Make arguments to string functions const.

Where a pointer is to a buffer that does not need to be mutable for
the operation of the function, use const char * instead. This avoids
some type errors where constant string are passed.
strife: Eliminate use of unsafe string functions.

Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
setup: Eliminate use of unsafe string functions.

Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
common: Eliminate use of unsafe string functions.

Remove some remaining uses of strncpy() and use M_StringCopy() instead.
HACKING: Add note about unsafe C functions.

Add a section to the HACKING file listing unsafe C library functions
that should not be used.