Improved HTMLCacheUpdate/RefreshLinks cache use synergy

* Also added missing $dbw->timestamp() calls

Change-Id: Ic82b6981bef9691c559a4076cbd551d8797ead33
Merge "Improved HTMLCacheUpdate/RefreshLinks cache use synergy"