Return end position of candidate in match function

The function should return the position of the end of the candidate that
matches prefix. This fixes font-locking in company popup.