FedCM: Client Clustering and Migration in Federated Learning via Gradient Path Similarity and Update Direction Deviation | Synapse