Close fds when not needed

File descriptors get closed when not needed by offboard mode
to allow position and attitude controllers to advertise and publish.