(bug 47950) Fix IndexPager detection of "is first" state

IndexPager currently assumes that if an offset is supplied, then it is
not at the first entry. This is trivially false in many cases, e.g. if
the offset is an older-than date and that date is in the future.

The only way to really determine whether we're at the first entry when
an offset is supplied is to query for 1 row in the opposite direction.
This patch does just that.

Bug: 47950
Change-Id: I05fec226abb609b78a62f2a23f35d5b52a48ab1a
Merge "(bug 47950) Fix IndexPager detection of "is first" state" into REL1_21