IDB: Implement IDBObjectStore.delete()
https://bugs.webkit.org/show_bug.cgi?id=127880

Reviewed by Sam Weinig.

Source/WebCore:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::compare): Make this const.
* Modules/indexeddb/IDBKeyData.h:

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::isExactlyOneKey): Returns whether or not
  the key range is known to represent precisely one key.
* Modules/indexeddb/IDBKeyRangeData.h:

* WebCore.exp.in:

Source/WebKit2:

Implementing IDBObjectStore.delete() involves filling in the already-stubbed deleteRange() method.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Call through to the backing store.

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange): Call deleteRecord on each key represented
  by the passed-in keyRange. This involves collecting each key using a cursor.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord): Delete an individual record from the
  object store and all associated indexes.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Teach the SQLiteIDBCursor to remember if it ended in an error condition:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
(WebKit::SQLiteIDBCursor::advanceOnce):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
(WebKit::SQLiteIDBCursor::didError):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163249 268f45cc-cd09-0410-ab3c-d52691b4dbfc