fix gh issue #484
support object comparison
do not allow exception handlers that are inconsistent with thread options to be copied