Simplify directory initialization in Files app.

This patch cleans up the initialization code, by separating the current directory from selection. Before, there was only one variable holding either current directory or the selection, and heuristics were used to determine how to interpred the path there.
The new code is also a preparation for migrating to URLs, since there are no more operations on the passed paths on the JS side. Note, that before we were fetching parent of a non existing path, which would be very tricky after migrating to URLs.

And finally, this patch fixes wrong behaviour of the select directory dialog. Since now, the selected directory is really selected, and not opened.

TEST=Tested manually several scenarios. All dialogs + recovering from crash. Drive and Downloads.
BUG=328767, 321962

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247556 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 247556
Fix a leak in client_cert_resolver

BUG=272596
TEST=chromeos_unittests under valgrind

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

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