Add ofThreadErrorHandler, support in ofThread and updated thread Example.

Addresses issue #1813