Updated sample.cpp: cross-platform (win32), best practices, etc.
Updated sample.cpp: cross-platform (win32), best practices, etc.

sample.cpp now supports Windows and *nix out of the box. Note that
to achieve clean cross-platform compatibility, it is reliant on
C++11 features (mainly threads). The pevents library itself remains
largely C++11-free.

Also documented a common fail: using Set/ResetEvent after a call to
DestroyEvent(). The correct pattern is to use an abort event and to
monitor it for main thread exit. The main thread should then wait
for helper threads to end before calling DestroyEvent. Calling
SetEvent/ResetEvent() on an event that has been destroyed is BAD
and will lead to BAD things (like SEGFAULTS). Don't do it. This
isn't exclusive to pevents; it leads to exceptions and fails on
Windows with the native events too.

neosmart/pevents,neosmart/pevents