Consensus Service: A Modular Approach For Building Fault-Tolerant Agreement Protocols in Distributed Systems