[emacs mode] Improve invalidation of completion cache
More accurate handling of Function.prototype.bind

Closes #122