Clean up of Gradle scripts

Moved common pieces up to root project as ext properties and a subprojects directive, in preparation for additional modules.