redo SWAP_DRAW_SURF to be 64 bit clean, from ioquake3
make this work on amd64
use memmove not strcpy when src and test overlap, from ioquake3
fix some warnings
use PATH_MAX not _MAX_PATH (MAX_QPATH) which is only 64

fixes stack abuse that was causing ssp to trigger
use strlcpy/strlcat when dealing with paths in extractfuncs
add some prototypes for swap functions
fix dedicated server build
include string.h for memset
amd64 cin fix from ioquake3