memcgroup: fix check for thread being a group leader in memcgroup