In some places it was assumed that PATH_MAX does not include a terminating null character. Increases PATH_MAX to 1024 to get in sync with NetBSD. Required some rewriting in AVFS to keep memory usage low (the stack in use by a thread is very small).
Increase gid_t and uid_t to 32 bits and provide backwards compatibility where needed.