localalloc: Add gs_fd_close cleanup

Now that we're encouraging use of openat(), fds are a lot more
prevalent.
gsystem-errors.h: Add gs_set_error_from_errno()

This is a long overdue move of this function to public API.
Port internal users to new gs_set_error_from_errno()

This is kind of long overdue...