move log4j to test scope for both SBT and Maven

The test scope is easier to understand than optional and it also keeps Log4j classes out of the compile classpath. Follow-up to PR #12.