Fix prometheus to survive mem3_sync termination

Currently, if `mem3_sync` is terminated, `prometheus_server` will
crash the BEAM when it tries to get internal replication jobs:
```
[error] 2023-05-31T15:52:13.989437Z node1@127.0.0.1 <0.1065.0> -------- gen_server couch_prometheus_server terminated with reason: no such process or port in call to gen_server:call(mem3_sync, get_backlog) at gen_server:call/2(line:370) <= couch_prometheus_server:get_internal_replication_jobs_stat/0(line:131) <= couch_prometheus_server:get_system_stats/0(line:118) <= couch_prometheus_server:refresh_metrics/0(line:90) <= couch_prometheus_server:handle_info/2(line:76) <= gen_server:try_dispatch/4(line:1123) <= gen_server:handle_msg/6(line:1200) <= proc_lib:init_p_do_apply/3(line:240)
```
and eventually
```
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{"Kernel pid terminated",application_controller,"{application_terminated,couch_prometheus,shutdown}"}
```

This adds a try/catch to prevent the crash.
2 files changed