IndexedDB: Ensure IDBAny holds the correct cursor type

IDBAny - a "tagged union" - holds various IDB and primitive types, and
via custom bindings will mint appropriate script values including
wrappers for IDB objects. There are two cursor types - IDBCursor and a
derived IDBCursorWithValue, and generating the correct wrapper type
is crucial. This was up to the caller, but possible to get wrong.

Change IDBAny to just take an IDBCursor and inspect it to determine
the specific type, so that the correct wrapper type is generated.

BUG=294505
R=dgrogan@chromium.org,alecflett@chromium.org,inferno@chromium.org,tsepez@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23437050

git-svn-id: svn://svn.chromium.org/blink/trunk@158066 bbb929c8-8fbe-4397-9dbb-9b2b20218538