implement ~exception in header, to make std::exception usable; fixes #1198