mon: MonitorDBStore: Add a key/value store to be used in the monitor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: keyring always on mon_data/keyring by default

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Paxos: Single-paxos support

We are converting the monitor subsystem to a Single-Paxos architecture,
backed by a key/value store. The previous architecture used a Paxos
instance for each Paxos Service, backed by a nasty Monitor Store that
provided few to no consistency guarantees whatsoever, which led to a fair
amount of workarounds.

Changes:
  - Add k/v store support
  - Add documentation describing the new Paxos storage layout and behavior
  - Get rid of the stashing code, which was used as a consistency point
    mechanism (we no longer need it, because of our k/v store)

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: PaxosService: Single-paxos support

Changes:
  - Add k/v store support, by creating wrappers to be used by the services
  - Add documentation
  - Support single-paxos behavior by creating wrappers to be used by the
    services and service-specific version
  - Rearrange variables so they are neatly organized in the beginning of
    the class
  - Add a trim_to() function to be used by the services, instead of letting
    them rely on Paxos::trim_to(), which is no longer adequate to the job
    at hand

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: Single-paxos support

Changes:
  - Add k/v store support
  - Use only one Paxos instance and pass it down to each service instance

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Elector: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MDSMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: LogMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonmapMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: PGMonitor: Single-Paxos support

Changes:
  - Add k/v store support
  - Add single-paxos support

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ceph-mon: Use the monitor's k/v store instead of MonitorStore.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
makefile.am: key/value store support on the monitor subsystem

Changes:
  - Add the MonitorDBStore and leveldb to libmon
  - Add leveldb and libosd to ceph-mon

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ceph-mon: fix store-related bugs

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Paxos: get rid of the machine_id field in MMonPaxos

This field was used to identify from/to which paxos service a given message
belonged. We no longer have a Paxos for each service, so this field became
obsolete.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>