Align more closely with Maven’s exclusion semantics

In Maven, when an exclusion, B, is declared on a dependency, A, that
exclusion applies to every transitive dependency of A, i.e. a dependency
on A or any of its transitive dependencies will no longer pull in B. A
concrete example can be seen with some of Spring Framework’s modules.
spring-core depends on commons-logging, spring-beans depends on
spring-core. If a dependency on spring-beans excludes commons-logging
then anything that was pulling in commons-logging via spring-core will
no longer do so.

See #3