refactor Peering & RecoveryState & add PGRecoveryStateInterface

draft that compiles and links

Signed-off-by: Loic Dachary <loic@dachary.org>