Fix indenting of HTML tags for instance. Fix #1294

If you press ENTER before a line, a new line is introduced by appending "\n" before it.
Therefor a previous line of "" is appended before the <TAG>-line.
This line remains unindented, causing a wrong indentation for the next line.
Basically this is fixed by indenting this line (oldBuffer.end.row = newBuffer.start.row).
Also added a specification, which tests this by appending \n before a javascript closing bracket,
which would, just as a closing html tag, would cause a wrong indentation.