Delay survey submissions

For issue #37. This queues survey submissions and tries resending them if there's a problem with Internet connectivity. @christhompson had landed some starter code; this goes the last mile and gets it working.
I have to admit that I don't entirely understand this code either, but I believe it's correct based on my reading:
https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB

"The call to the open() function returns an IDBOpenDBRequest object with a result (success) or error value that you handle as an event."

And they do the same thing with a |request| object.