DevTools: [CodeMirror] improve indent autodetection

This patch improves indent autodetection for the following specific
usecase.
Consider a program indented with 2 spaces, but most of lines
resulted in indents of 4 and 8 spaces. At the moment, autodetection
will set indent to 4 spaces, which is wrong. The code and the test case
cover this situation.
This is not a made-up situation, I actually ran into it while editing
one of the CodeMirror's addons called "closebrackets".

BUG=
R=apavlov@chromium.org

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

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