Created pager class for SQL results.

Created a pager class that can page thorough the results of
an SQL query (with optionally supplied parameters). A separate
SQL query must be provided to determine how many results exist
in total.
Optimized page view counter admin page.

Used query from David Juhasz to speed up page view counter admin page.