Update database.php

-Separated pager into a subclass
-Several bug fixes
-Added destructor to close connection
-Changed "where" default in select function.