Better contact autocomplete based on jquery-textcomplete

Some benefits: greatly reduced amount of code, easy to extend to other types of completion, popup appears at caret location