Chaning ProcessObject::AddCommand to take command as reference

Change-Id: Ib445bbbf1e1b970e9dc57d73d2cb2f143a89a2f8