Allow toggling whitespace-mode

Not the shiniest of features, but it led to the fix in 61b9cf4 and the cleanup in the subsequent commit.

I'm not entirely sure it's okay to create the non-invisible temp buffer (some minor modes will do extra work?), but the code is much nicer for it, and it seems to work fine so far.