This moves the code from HtmlPageLinkRendererBeginHookHandler to handle the HtmlPageLinkRendererEnd hook instead to have all code dealing with entity links in one place. It changes the existing code to rely less on Title and LinkTarget objects and instead use EntityId where possible. This commit also changes how title attribute for ForeignEntityId is handled and also changes SimpleEntityLinkTargetEntityIdLookup to work with SpecialPages. Bug: T252409 Depends-On: I6fa2884473f3981ace416b982fdbbe509f7987b4 Depends-On: Id702ea997722a1132e6a94c14c704b0a01f0470e Change-Id: Ib4cbc6d24d124d27c12fb54427a9dc37bf1fcd3d