Remove overlapping test dependencies

Previously, the test classpath of each project contained multiple
copies of a number of Hamcrest classes. This commit adds some
exclusions to remove the overlapping dependencies so that the test
classpath contains a single source for each Hamcrest class.