detect if inside Docker container

@tduffield @atomic-penguin @paulczar so, I think this only would affect a couple people, if any, but it's a breaking change and therefore semver says we should wait to ship it. Could you give this a second thought and potentially disagree?

The alternative maybe is to leave this part of the code alone for now (adding in the dockerinit feature), then separately changing this code to work this way. I'm not sure how useful that is to anyone, but perhaps if the dockerinit stuff is more reliable than cgroups, i.e. maybe sometimes the cgroup file doesn't exist, we at least get better coverage.