Revert "Declare some used variables using defvar"

This reverts commit 38392c08fbf6c923ad7965a9189aeb660a850467.

That fix didn't actually solve anything.
Handle several edge cases when whitelisting collection functions

Specifically, the whitelisted function can now be any of:

* A symbol
* A lambda
* A byte-compiled function
* A partial application of any of the above

And furthermore, byte-compiled functions also test equal to
un-compiled ones.

Fixes #36, where "bookmark-completing-read" passes a lambda as a
collection, and that lambda may or may not be byte-compiled depending
on whether bookmark.el is compiled. (This commit also adds that lambda
to the whitelist.)