support starting as Hot Standby and add check_wal_receiver parameter

I split my patch.
ref: https://github.com/ClusterLabs/resource-agents/pull/185