Fix an issue where testing the GCP PubSub could leak memory, and an issue where its JWT token would fail to refresh a second time.