Revise HVD event & enable logging from outside main thread

Because drawing is not the only functionality that might modify GUI from
outside main thread, I've revised HVD event class into a generic event
class (rather than specific event class for drawing event).
Another change in HVD event class is that, shared data members between
cloned instances is now a nested class.

Also, multi-threaded variant of Log* functions has been added into
logger component.  This enables logging from outside main thread.
Improve video stream end handling

This removes some redundant code, and fixes some errors on sending last
frame.
Add detection functionality

Starting from this commit, HVD is no longer a pure video player, but a
detection program.