Feature: allow to set delay_threshold_by_time in milliseconds.
Previously it was allowed only in seconds. Also put some
refactoring. Create new function "check_replication_delay" which
checks the replication delay and returns 0, -1 or -2, depending on "no
delay", "delayed (delay_threshold_by_time)" or "delayed
(delay_threshold)" accordingly. This should simplify the lengthy
if-statement to check the replication delay.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-August/004372.html