Fix requery behaviour of MemoryCursor.

As we can't restore the contents of the cursor window, we need to keep
it on deactivation so we can restore it on requery().

Change-Id: I06f688bbe9120c307bdc3ddbc3833416becdec82
Accelerate the thumbnail extraction when the sync-frame duration is long

When the sync frame duration is very long in the test clips, the
thumbnail extration will be very slow. Because the program will
have to decode from the previous sync-frame to the desired frame.
If end user presses the exit button before the thumbnail
extraction finishes, sometimes ANR will happen.

In this patch, if the desized frame's timestamp is 3secs larger
than the previous sync-frame, we will choose to use the sync-frame
as the thumbnail.

Note: This patch is related to a change in platforms/frameworks/av

Change-Id: I6de00af651d8b6036bbc19b50832296780228a3a
Author: Wei Feng <wei.feng@intel.com>
Signed-off-by: Wei Feng <wei.feng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 58036