Special logic to handle dots for autocomplete.

Most of this code will go away when getSuggestions's "replacementOffset"
field starts working, but who knows when that will be?