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
my brain can also only keep one mocking library loaded, and `mock` seems to be the future (it's in the stdlib as of 3.3). might as well start moving that way.