Check the return value of close() to prevent data loss

When updating the serverdb file or job files, pbs_server will write the
new data out to a temporary file and then overwrite the original.  In
some cases (ENOSPC over NFS, for example), write errors may not show up
until the file is closed.  In this case, keep the old file around (old
data is usually better than data loss).