rspro_client: implement re-establish delay

- add new SRVC_ST_REESTABLISH_DELAY state with delay stipulated by table
k_reestablish_delay_s[], that implements a simple exponential-like back-off
with an upper bound.
- new function srvc_do_reestablish() is used to initiate a reestablish, and
apply the appropriate delay, if any.
- takes external delays (such as TCP connect() delay) into account, and does
not double-penalize.
- delay is reset to shortest possible if there has been no reestablish
initiated in a long time (2x greater than our longest delay). Allows for
fast reconnects even if a delay was used to connect.
- addresses issues https://osmocom.org/issues/5348 and https://osmocom.org/issues/5610

Change-Id: I86cdc3ba37482e6577b429194d273a2399f32208
diff --git a/src/rspro_client_fsm.h b/src/rspro_client_fsm.h
index 029fcd9..55fe4a4 100644
--- a/src/rspro_client_fsm.h
+++ b/src/rspro_client_fsm.h
@@ -26,6 +26,13 @@
 	struct osmo_fsm_inst *fi;
 	struct osmo_fsm_inst *keepalive_fi;
 	int (*handle_rx)(struct rspro_server_conn *conn, const RsproPDU_t *pdu);
+
+	/* index into k_reestablish_delay[] for this connection */
+	size_t reestablish_delay_idx;
+
+	/* timestamp of last re-establish attempt, in milliseconds */
+	int64_t reestablish_last_ms;
+
 	/* IPA protocol identity */
 	struct ipaccess_unit ipa_dev;