WatchedItem: avoid select/writes for anon user in WatchedItem

This will save us several milions of queries a day

Backporting https://github.com/wikimedia/mediawiki-core/commit/21884f7537d6562a54241469f378229030b5bfa5#diff-64fe2609dd41ca7d16d8dff717036ed9R140

For a page view of a anon user the following select is executed:
SELECT  wl_notificationtimestamp  FROM `watchlist`  WHERE wl_user = '0'
AND wl_namespace = '0' AND wl_title = 'Hauptseite'  LIMIT 1
Do not load special pages in WatchedItem::load

Backporting https://github.com/wikimedia/mediawiki-core/commit/607449cb84e20c5b1035f4b6867b3d1ac6b26567#diff-64fe2609dd41ca7d16d8dff717036ed9R32

WatchedItem::load was looking for a special page in the database:

SELECT  wl_notificationtimestamp
FROM `watchlist`
WHERE wl_user = '1'
AND wl_namespace = '-1'
AND wl_title = 'Log'
LIMIT 1

But it is known that such a page never will stay in the database,
so added a check to avoid the select.
ImageServing: prevent queries by page_id = 0

SQL SELECT /* ImageServing::getImages Bloodsucker616 */  page_namespace as ns,page_title as title,page_id as id  FROM `page`  WHERE page_id = '0'
GlobalTitle: improve caching
WikiFactory: report the function that cause the DB query
Merge pull request #4826 from Wikia/release-243-image-serving-and-watched-items-and-less-db-queries

Backporting performance improvements (release-243)