Add a timeout for GCE detection.

This is a temporary workaround for #93, though may end up being the final fix.

I did some test cleanup while I was here, switching to `mock`.

PTAL @dhermes
Mox and mock? At the very least you should file an admittedly aspirational bug to choose one ~~ring~~ mocking library to rule them all.