Automatic Layer Freezing for Communication Efficiency in Cross-Device Federated Learning