Add error checking for fcntl

Coverity warns about system calls that lack error checking. At a
minimum this may help point out other problems if these warnings
show up.
Don't log errors when trying to close non-existant FDs

This just keeps the .xsession-errors log file from having around
a thousand error messages when gnome-compat tries to close file
descriptors that never existed. Other error messages will still
properly show.