Bug: getUserLinks wrong output for anons

getUserLinks was, in certain conditions, outputing the same user links
HTML for all anonymous users.  This adjusts the caching to match
other parts that use id+ip as the key.

Change-Id: I0af96d6efbf2bf51d9f1a31c359effdfd73fbd0a
Merge "Bug: getUserLinks wrong output for anons"