BUG/MINOR: stats: use refcount to protect dynamic server on dump

A dynamic server may be deleted at runtime at the same moment when the
stats applet is pointing to it. Use the server refcount to prevent
deletion in this case.

This should be backported up to 2.4, with an observability period of 2
weeks. Note that it requires the dynamic server refcounting feature
which has been implemented on 2.5; the following commits are required :

- MINOR: server: implement a refcount for dynamic servers
- BUG/MINOR: server: do not use refcount in free_server in stopping mode
- MINOR: server: return the next srv instance on free_server

(cherry picked from commit 0a8d05d31cc30279f4636ae1025d9e43d53719c9)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
3 files changed