mm-video: vidc: Reliably stop the message thread

Message thread blocked on a read(), may never wake
if the joining thread fails to write the stop
command.
Instead, monitor the input pipe with timed-wait,
and bail-out in case stop is signaled.

Change-Id: I35409034f66281b8acaa216171d85f1dfd868906
4 files changed