Fix browsing by using the proper SQL queries

This bug has been there forever, since the author misunderstood the
limit statement's semantics. With this patch there will be always
browsing-steps pastes visible. This patch also fixes the
number-of-post query to omit paste annotations.