Catch public_key module exceptions

At least the `public_key:pkix_is_self_signed/1` call appears to throw errors under [certain circumstances][1].

[1]: https://github.com/processone/ejabberd/pull/174#issuecomment-41411354