Add osmo_fsm_find_by_name() and avoid registering FSM with same name

This addresses a FIXME in the fsm.c code: osmo_fsm_register() should
fail in case a FSM with the given name already exists.

Change-Id: I5fd882939859c79581eba70c14cbafd64560b583
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index a2c20b7..952f82f 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -140,6 +140,7 @@
 
 int osmo_fsm_register(struct osmo_fsm *fsm);
 void osmo_fsm_unregister(struct osmo_fsm *fsm);
+struct osmo_fsm *osmo_fsm_find_by_name(const char *name);
 struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv,
 					  int log_level, const char *id);
 struct osmo_fsm_inst *osmo_fsm_inst_alloc_child(struct osmo_fsm *fsm,