DevTools: initialize "format script" button with current UISourceCode

As of today, the "format script" button is initialized as hidden and
will update its state in response to editorSelected event. However,
in case the event is sent prior to button construction, it should be
initialized with current selected editor.

BUG=424089
R=vsevik

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183881 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: REGRESSION: can not copy Link address in console

BUG=424171

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183885 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: wrong event was used as an indicator of finished write operation.

FileWriter calls onwrite as notification about the progress of writing.
So If we call write again from the onwrite event handler FileWriter fails to do that.
Actually we need to use onwriteend callback.

BUG=423843

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

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