base: Make emulated discardable memory handle malloc failure properly and protect against overflow.

TEST=base_unittests --gtest_filter=DiscardableMemoryProviderTest.Overflow
BUG=

Review URL: https://codereview.chromium.org/101293004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239225 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 239225