gmm: Move code handling GMM Attach Complete to its own function

Change-Id: I2d8d947ab1eb4100f404b885461f7a30583c9ac6