A man has faced court after a Muslim religious leader was allegedly punched in the face during an attack in Melbourne.