Propagate more information about ValueStore errors to callers, notably an
error code in addition to the error message. This turned out to be a
surprisingly invasive yak shave and is accompanied by a few very small fixes
to inefficient and overly complex code I noticed along the way.

This is the first stage in making the chrome.storage extension/app API able to
gracefully recover from leveldb corruption.

BUG=261623
R=mpcomplete@chromium.org
TBR=tim@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222178 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed