Make HTML and CSS code completion not to overwrite the neighboring text.

This fixes issue #3005 for HTML and CSS code completion. 

Changes for HTML code completion are
 * Never replace the existing tag or attribute name if code hint is invoked at the very beginning of an existing tag or attribute name.
 * Replace an existing tag, or attribute name/value if it is invoked when the cursor is inside (or at the end of)  an existing tag or attribute name/value.
 * Always replace an existing attribute value even if it is invoked from the very beginning of the attribute value. (ie. after the ``=`` or ``"`` or ``'``)