Combining show/hide api key button into one button.

Addresses #1252.

I also ended up caching the result and storing it in a jQuery data object to prevent unnecessary HTTP requests.