Move cache table creation to modules

This also moves the creation of a SQLite database connection to a
_get_connection() function to ensure the cache is only created when the
caches are instantiated.
Explicitly define tables used for cache

This introduces the tables property in the Cache object that is used to
define the used tables.

This also fixes the storing of mulit-valued attributes in the cache.
Give cache tables friendlier names

This also defined the tables for netgroup storage.
Make Cache a context manager
Use retrieve_by, group_by and group_columns in the cache

This removes custom retrieve() functions and Query classes from the
database modules and uses retrieve_sql retrieve_by, group_by and
group_columns to make a custom retrieval query.

In the cache module this completely replaces how the query grouping is
done. The Query class is now only used inside the cache and the
CnAliasedQuery, RowGrouper and related classed have been removed.
Implement tests for caching functionality
Improvements to pynslcd caching functionality

This fixes most of the existing caching functionality. Cache expiry,
negative hits and entries going away remain to be implemented.