move most of the logic from trends.php to trends.inc so it can be shared by viewsites.php
move most of the logic from trends.php to trends.inc so it can be shared by viewsites.php

git-svn-id: d5a8a4092b1c3eddbe100e0c5fc6446cfb12afd1@378 fc7d47d3-c008-acd5-f51f-d19787b8a02f

HTTPArchive/httparchive,paulcalvano/httparchive,HTTPArchive/httparchive,paulcalvano/httparchive