Add necessary max_connections configuration.

Configure max_connections on all instances based on accommodating the
max_wal_senders value of the primary.  This is mandatory as even though
individual standbys may not have the same max_wal_senders as the primary, its
max_connections value must match that of the primary.  In most likely set-ups
(those that won't allocate max_wal_senders to a point where it uses up all
max_connections) the max_connections value was fine at its default of 100, but
high numbers of standbys would exhaust the supply of connections and result in
failed standby startups, and an inability to connect to the primary when using
the 'fan' replication structure.

Also convert backtick command escapes into $() command substitution syntax, and
evaluate boolean variables without unnecessary test syntax.  This last change
(regarding boolean evaluation) may potentially be bad form, so could be
reverted if I discover that is the case.