Significant performance enhancements for blog and events, especially blog:

* We already know the list of virtual page ids for the events by the time we hit the buildQuery method in BaseaBlogActions. It's very slow to send huge lists of page ids to MySQL. Even the count query can be very slow and we already know the count! Instead, if the app_aBlog_arrayPager flag is true, use an array pager and paginate the virtual page ids. This saves as much as 50% on a big database of articles. Note that if you set this flag, you MUST fix your indexSuccess.php to use $results rather than calling $pager->getResults directly. If you don't want to do that, just don't set the flag.
* Don't call getResults twice on blog posts! That does two queries, sfDoctrinePager does not cache results. Oops. If you have overridden aBlog/indexSuccess or aEvent/indexSuccess, you should start using $results rather than $pager->getResults to get the benefit of this improvement. However if you don't, your code will not break (full bc).
* Optimized popular tags query. "group by id" is much faster than "group by name," and selecting only the ids and then going back later for the names is much faster too. (On a site with zillions of posts you have probably already shut off the "all tags" query.)
* Refactored query calls in aBlogToolkit to make it easier to add profiling, with commented-out examples



git-svn-id: http://svn.apostrophenow.org/plugins/apostropheBlogPlugin/branches/1.5@4983 c89fab08-2f9b-42bf-8176-bd3ad6bee547