e1_input: Use osmo_use_count in e1inp_line

osmo_use_count is available since libosmocore 1.1.0 release, so bump
required libosmocore version in autotools and packages.

struct e1inp_line field refcnt is kept in order to keep ABI
compatibility accessing struct fields. The new use_count is added at the
end. Size of struct changing is fine since it is allocated through
an API and a pointer should be used by clients.

e1inp_line_clone API is changed but it's not used by anyone outside
libosmo-abis, so it's fine.

Related: OS#4624
Change-Id: I0658b2e9c452598025cc0f1d0b060076171767cc
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 917a195..5d17839 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -293,7 +293,7 @@
 			/* Finally, we know which OML link is associated with
 			 * this RSL link, attach it to this socket. */
 			bfd->data = new_line = sign_link->ts->line;
-			e1inp_line_get(new_line);
+			e1inp_line_get2(new_line, "ipa_bfd");
 			ts = e1inp_line_ipa_rsl_ts(new_line, unit_data.trx_id);
 			newbfd = &ts->driver.ipaccess.fd;
 
@@ -310,7 +310,7 @@
 				goto err;
 			}
 			/* now we can release the dummy RSL line. */
-			e1inp_line_put(line);
+			e1inp_line_put2(line, "ipa_bfd");
 
 			e1i_ts = ipaccess_line_ts(newbfd, new_line);
 			ipaccess_bsc_keepalive_fsm_alloc(e1i_ts, newbfd, "rsl_bsc_to_bts");
@@ -328,7 +328,7 @@
 		close(bfd->fd);
 		bfd->fd = -1;
 	}
-	e1inp_line_put(line);
+	e1inp_line_put2(line, "ipa_bfd");
 	return -1;
 }
 
@@ -603,7 +603,7 @@
 	struct osmo_fd *bfd;
 
 	/* clone virtual E1 line for this new OML link. */
-	line = e1inp_line_clone(tall_ipa_ctx, link->line);
+	line = e1inp_line_clone(tall_ipa_ctx, link->line, "ipa_bfd");
 	if (line == NULL) {
 		LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");
 		return -ENOMEM;
@@ -642,7 +642,7 @@
 err_line:
 	close(bfd->fd);
 	bfd->fd = -1;
-	e1inp_line_put(line);
+	e1inp_line_put2(line, "ipa_bfd");
 	return ret;
 }
 
@@ -655,7 +655,7 @@
 
         /* We don't know yet which OML link to associate it with. Thus, we
          * allocate a temporary E1 line until we have received ID. */
-	line = e1inp_line_clone(tall_ipa_ctx, link->line);
+	line = e1inp_line_clone(tall_ipa_ctx, link->line, "ipa_bfd");
 	if (line == NULL) {
 		LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");
 		return -ENOMEM;
@@ -692,7 +692,7 @@
 err_line:
 	close(bfd->fd);
 	bfd->fd = -1;
-	e1inp_line_put(line);
+	e1inp_line_put2(line, "ipa_bfd");
 	return ret;
 }