Reset tops parameter to default value if too long

If the "tops" URL parameter exceeds 20 characters it is turned
into a logarithmic expression which also includes letters and
hence makes the query fail which expects numbers only.

Reported by Jakub Galczyk.

Change-Id: I3fb34eecda203aa900430730bee5075c683c61e1
Merge "Reset tops parameter to default value if too long"