Make use of the user_timestamp index in ApiQueryAbuseLog

Furthermore sanitize IPs as ::01 == ::1

Change-Id: I91489d17c012004f607bbe571b9a2702afbf3d81
Merge "Make use of the user_timestamp index in ApiQueryAbuseLog"