ClassUtils: be defensive when caching annotations
ClassUtils: be defensive when caching annotations

This avoids the following exception when injecting the
application context into the ImageJ gateway:

java.lang.UnsupportedClassVersionError: net/imagej/ops/OpService : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
	at java.lang.Class.getDeclaredMethods(Class.java:1868)
	at org.scijava.util.ClassUtils.cacheAnnotatedObjects(ClassUtils.java:507)
	at org.scijava.Context.inject(Context.java:377)
	at org.scijava.AbstractContextual.setContext(AbstractContextual.java:68)
	at org.scijava.AbstractGateway.<init>(AbstractGateway.java:85)
	at net.imagej.ImageJ.<init>(ImageJ.java:90)

scijava/scijava-common