JCR-2435: [patch] Fix overly specific casting in core Patch by Dave Brosius, plus some Java 5 cleanups to ChildNodeEntries