Multi-Frequency Joint Community Detection and Phase Synchronization