Port totalHeight() and fix inline editor sizing issues

Depends on adobe/CodeMirror2#79

Pull request is for brackets cmv3 branch.