[FW][FIX] web: include postgresql server testing in health route
Description of the issue/feature this PR addresses:
Prior to this commit, the health route is responding with a 200 status even when the database server is down or unreachable.
In deployment scenario (CI/CD), this route (/web/health) is (can be) used in order to get the deployement state. This is actually the only one that can be used in order to check it without an active session or credentials or master password.
Including the optional db_server_status arg will allow integrating the postgresql server state without breaking any eventual existing overrides.
Current behavior before PR:
When the postgresql database is not up / not reachable the route is returning a 200 code.
Desired behavior after PR is merged:
When the postgresql database is not up / not reachable the route is returning a 500 code. As we are in stable, an optional argument has been added to the route in order not to break any potential existing overrides.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#182840 Forward-Port-Of: odoo/odoo#182537
This PR targets saas-17.2 and is part of the forward-port chain. Further PRs will be created up to master.
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
