Fix crash in ExtensionFunctionDispatcher due to invalid Profile/BrowserContext

The Profile may be closed (and hence the BrowserContext becomes invalid) after
the LogSuccess task is posted to the UI thread. We don't care about logging
function call activity for a profile that just closed, so skip the logging.

BUG=341195
TEST=existing extensions browser_tests
R=benwells@chromium.org

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

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