urlprefix and ranking query.

Updated the code to account for the urlprefix column.
RankingQuery class is now a database helper class. A class for each
of the supported DBMS is required to make use of the DBMS specific
features to get the ranking done in the database instead of doing
it on the php side.

Created a template file for the phpunit.xml

This is more of an intermediate commit.