Pre-emptive fix for the anticipated removal of ListBuffer.lb() in javac8
[jdk8support] there was a bunch of duplicate code in both JavacAST and JavacResolution. We've unified this (and fixed the fact that the JavacAST variant didn't work with javac8).