breakup contextInitialized() into smaller methods

Each method is protected so subclasses can override them. This lets subclasses customize what's done or skip it altogether (by making the overridden method do nothing).
fix bug where we incorrectly determine Sun/Oracle JRE

Java 7 reports the java.vendor System property is "Oracle Corporation".
See https://blogs.oracle.com/kto/entry/jdk7_pending_java_vendor_property