Catch more errors to detect when JNotify fails to load

Fixes #2831

I list the the exceptions we want to catch rather than just catching
Throwable. That's because Throwable matches  a lot of stuff we don't
really want to catch, e.g. OutOfMemoryError.
Minor change to stop a compiler warning
Merge pull request #2909 from richdougherty/jnotify-catch

Catch more errors to detect when JNotify fails to load