Use mock temp file in profiler tests

Mock temp file implementation is used in all inspector tests instead of the real implementation based on temporary filesystem which (unlike temp fs in regular DevTools window) has limited quota which is often exceeded in the tests.

This should fix flakiness in the following tests:
inspector/profiler/heap-snapshot-loader.html
inspector/profiler/cpu-profiler-save-load.html

Also a bug in BufferedTempFileWriter.close was fixed.

TempFile.getFile was replaced with writeToOutputSteam which operates on types defined in DevTools and simplifies mocks.

BUG=330617,333860
R=alph@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@165136 bbb929c8-8fbe-4397-9dbb-9b2b20218538