e1_input: add new refcounting scheme to avoid leaking E1 lines

This patch 's/e1inp_line_get/e1inp_line_find/g' since we need this
function name for the new refcounting scheme.

Basically, I have added a new function to clone lines that is used
by the ipaccess driver:

struct e1inp_line *e1inp_line_clone(void *ctx, struct e1inp_line *line);

And two functions to bump and decrement the refcount:

void e1inp_line_get(struct e1inp_line *line);
void e1inp_line_put(struct e1inp_line *line);

This is useful to avoid leaking virtual E1 lines in the ipaccess
case, since we have two sockets for OML and RSL respectively, we
have to release the line *once* both sockets have been closed.

Without this patch, there are cases in which we don't know if it's
time to release the virtual E1 line.

This patch also includes a fix to avoid crashing if we open a
connection with OML/RSL port without sending any ID_RESP message
(in that case, we have no chance to set the signal link). I tested
these situations with netcat.
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index 55a9951..212a4ac 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -47,7 +47,7 @@
 	struct e1inp_line *line;
 	int e1_nr = atoi(argv[0]);
 
-	line = e1inp_line_get(e1_nr);
+	line = e1inp_line_find(e1_nr);
 	if (line) {
 		vty_out(vty, "%% Line %d already exists%s", e1_nr, VTY_NEWLINE);
 		return CMD_WARNING;