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.
Merge pull request #92 from ptrv/fix-match-function

Return end position of candidate in match function