Simple refactoring of profiles and dependencies into the project top level pom.xml

This was drawn out by the work on java 7 compatibility. It is a standalone commit so it's worth merging on its own.