Adds test for Monitors and fixes issue with listener removal

The test MonitorsTest.shouldUnregister() was failing with a ClassCastException.
 The reason was that it was doing the cast on a field different than the one that
 it was performing the instanceof check.

Conflicts:
	community/kernel/src/test/java/org/neo4j/kernel/monitoring/MonitorsTest.java