Fix two tooltip problems

* company-safe-substring: take into account character composition.
* company--replacement-string: append default face everywhere, so that we never
  inherit face background from the character at the end of the overlay.