For performance, re-introduce web-history-max-items. As the history query has now become a very specific multi-part query and history completion was the only consumer of SqlCategory, SqlCategory is now replaced by a HistoryCategory class.