Be explicit about target type in platform_util::OpenItem()
OpenItem() now takes an OpenItemType parameter that should specify
expected type of the object to be opened. It verifies the type of the
object before invoking platform specific logic for opening the item.
Code that assumed that the target of OpenItem() was always a folder
should now no longer unintentionally open or execute the file at the
target location when this assumption was found to not be correct.
In addition to the checks performed by OpenItem, the platform specific
logic used to open folders fail if the target type is not a directory.
BUG=387037
Review URL: https://codereview.chromium.org/352393002
Cr-Commit-Position: refs/heads/master@{#319555}