list.js: Prevent the list from focusing to the bottom of the list

When the lead item was taken off the selected items, the last selected item became the new lead item. But this behaviour made the list scrolled to the last. With this patch, in such case, the nearest item becomes the new lead item instead. This fixes the issue of crbug.com/276827.

This commit is re-land of r229030.

BUG=276827
TEST=manually tested
TBR=nkostylev@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229384 0039d316-1c4b-4281-b951-d872f2087c98
drive: Remove unused ResourceMetadata::GetResourceEntryByIdOnUIThread

BUG=
TEST=unit_tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229385 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 229384
Observers of NetworkPortalDetector explicitly unsubscribe from notifications during destruction.

BUG=302812

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

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