fix Class.getInterfaces to return only declared interfaces

Previously, we returned all interfaces implemented directly or
indirectly, which did not match the JDK behavior.
Merge pull request #345 from dicej/class-getinterfaces

fix Class.getInterfaces to return only declared interfaces