DevTools: [CodeMirror] fix autodetect feature

This patch fixes a bug in autodetection feature which
caused it work incorrectly on some large files.

BUG=

Review URL: https://chromiumcodereview.appspot.com/21264006

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