Issue #2953921 by andypost, donquixote, borisson_, effulgentsia: Refactor out theme hook suggestion building from ThemeManager::render() into a separate function