QCamera2: Fix race condition between streamoff and qbuf.

QBuf might accidentally add poll fd again while streamoff is trying
to deleted it. This may result in another frame to HAL and may try
to post to the cmd thread which is already cleaned up as part of
streamoff sequence. To avoid such race condition, add check for
cmdthread existence before trying to post msg from polling thread.

Change-Id: Ibf0382464b063b02917e70541559cfe66e679979
4 files changed