Basic undo coalescence

My attempt for https://github.com/ajaxorg/ace/issues/300 .
I think we need to know change source (keyboard, paste, dnd) for correct undo entries grouping. And I think cursor movement should break undo series.