Clears the reference to a InputMethodFactory before the termination.

We need to null-clear the reference so the leak sanitizer doesn't detect the pointer as a leak.

Also see http://crrev.com/107543002

BUG=312211
TEST=none

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

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