Clean up gradle build files.

Set up one central place for them, might move them into separate files
again later. Define common subproject tasks. Remove unnecessary
gradle wrappers in sub-projects.
Define simple,log4j,protobuf as a maven dependency + remove unused.