drm_hwcomposer: avoid creating release fences for invalid OutputFd

This change also adds a check for OutputFd to see if it is valid.

Change-Id: If992d523c707cc5e6e660de721938a26f27477d8
diff --git a/autofd.h b/autofd.h
index 0c4bd66..bc5127a 100644
--- a/autofd.h
+++ b/autofd.h
@@ -91,6 +91,10 @@
     return *fd_;
   }
 
+  operator bool() const {
+    return fd_ != NULL;
+  }
+
  private:
   int *fd_ = NULL;
 };