Autonomous Grouping in M2M Communications