Handle custom exception types in proxy

Python 3 requires the exc_val passed from the proxy to be an actual
Exception subclass, which is complicated by the fact that plugins
typically turn it into a string for the purposes of appending/modifying
information.

However, since we cannot rely on the exc_class taking only the message
as its argument, it is not safe to simply instantiate a new copy.
Instead, create a new Exception subclass with the same name and module
as the original (to ensure correct reporting) and instantiate this
instead.

Fixes #610

Signed-off-by: Zane Bitter <zbitter@redhat.com>