Fix cast_unittests valgrind failures

All valgrind failures are now fixed. Also changing the tests to run
with less iterations.

BUG=329333, 329345

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

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