Unifying Diarization, Separation, and ASR with Multi-Speaker Encoder