Changed tokenInput to accept function as its datasource

Hi 

I've changed the functionality of tokenInput to accept a function as its datasource rather than a simple ajax URL generator.
I'd appreciate if you consider this. If so I'll update the website pages to document this.

Cheers
Ahmad