Part of #1138 - fix caret rendering in empty paragraphs, void elements and end of paragraphs
add getScroll method to dom.js for getting cross-browser scrollTop and scrollLeft