Android: limit image decoded size based on amount of physical memory

The previous change (https://codereview.chromium.org/23600067/) added
limit for low end devices (memory <= 512MB). Now limit on all devices
to display huge images without crash or displaying as corrupted images.

This CL is still Android. The method might be also useful on other
platforms but the best parameters may differ (may be affected by the
swap memory).

BUG=303848

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

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