KAFKA-840 Controller tries to perform preferred replica election on failover before state machines have started up; reviewed by Neha Narkhede