examples: Enable all examples to build on all platforms

Prior to this change, the dpfp and sam3u_benchmark examples were only
built on POSIX platforms due to a dependency on sigaction(). Furthermore
the dpfp_threaded example only worked with POSIX threads.

Lift this limitation by breaking the dependence on sigaction(). Also
provide a minimal threading abstraction so that dpfp_threaded can be
built on Windows as well.

Also merge the sources for dpfp and dpfp_threaded. The only difference
between the two is how libusb's event handling functions are called and
this can be easily handled within a single source file.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
7 files changed