Enhancing Communication Efficiency in FL with Adaptive Gradient Quantization and Communication Frequency Optimization