srm: Fall back to synchronous saving in case of overload

Requests are stored asynchronously in the database to avoid that the
save affects request processing. When the database cannot keep up, such
as may happen during an inrush of bulk bring-online requests, saves
to the database are dropped. A code comment claims that this only
affects monitoring, however the effect of SRM restarts, both as observed
by the client and wrt clean-up of upload directories. It also affects
debugging as information on past requests will be incomplete (something
one may be particularly interested in after an overload situation).

Saves are naturally classified into major and minor saves: Those that
merely log state transitions and those that contain updates to the
information about a request.

This patch changes the logic so that only minor updates are dropped. Major
updates are stored synchronously in case the asynchronous save queue
is full. This creates natural back pressure by slowing down request
processing.

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7310/