IndexedDB: Optimize IDBCursor.advance() if it occurs within prefetched range

To reduce the IPC overhead, repeated IDBCursor.continue()
calls trigger pre-fetching where multiple values are
fetched at once. As long as only simple continue() calls
are made, the pre-fetch cache can be used to service them.
Other calls invalidate the cache.

IDBCursor.advance() is like a continue() call that skips
over values; it is safe to use the cache as long as it is skipping within the pre-fetched range, so do so.

(TBR for a unittest 'friend' change)

TBR=jam

Review URL: https://codereview.chromium.org/104663007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242045 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 242045