Default log4j initialization causes errors for those not using log4j

This is a re-do of #560 which got merged too soon. There are some maven build issues we need to fix before merging this.

Note currently the diff here is weird because github hasn't caught up with apache git.