Pull common queries out from a base class

The base class was causing the dispose to not fire correctly inside both
the consumer and producer.  I have moved the common queries into a class
called MetadataQueries and provided an interface for it.  Both the
consumer and producer now simply implement this interface to expose the
two methods.  Not sure if this is the best way to remove the base class
dependency which I didn't like in the first place.  Test are passing now
for consumer and producer.