Add a better test for service environment variables. Fix bugs.

Closes https://github.com/GoogleCloudPlatform/kubernetes/issues/876
Actually GetServiceEnvironmentVariables calls into makeLinkVariables, so it's still tested.