Avoid calling the same completion function more than once

This fixes the case in which different sources map to the same completion
function, by keeping track of which functions have been already invoked.
Doing this is needed to keep the user from getting duplicates if they e.g.
set both 'completefunc' and 'omnifunc' to the same function. By the way,
it also avoids the issue if a plugin (or different ones) set both to the
same value, and so on.