feat(database): enable highly-available database components

Implements PostgreSQL replication and master election/promotion via
etcd with automatic failover.