KAFKA-1583; Encapsulate replicated log implementation details into
ReplicaManager and refactor KafkaApis; reviewed by Joel Koshy and Jun
Rao