Remove reliance on deprecated methods and sun-specific APIs.

- Reflection.getCallerClass() will be removed in Java 8
- SecurityManager.checkMulticast(InetAddress, byte) is deprecated