Added support for excluding and including specific keys.

This feature allows easy implementation of queries that need to exclude
certain records from consideration. Even though this could be
implemented with filters, it is more efficient this way, because we
prevent the database record from being loaded into memory.