memcg: add mem_cgroup_same_or_subtree() helper