Remove duplicate transitive dependencies

This PR adds a number of transitive dependency exclusions so that, where possible, each project only has a single source for each class on its classpath. Please see the commit message for further details.