bsc: on-demand setup of nanoBTS and HSL femto sockets

The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.

This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.

I added two new attributes to the gsm_bts object, they are:

* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.

* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().

Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.

While I was at it, I added several changes/cleanups to this patch:

* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.

* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.

* Add missing e1inp_init() in osmo-bsc.

* Fix missing declaration of hsl_setup in openbsc/e1_input.h
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 1fa039b..2406873 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -40,6 +40,7 @@
 #include <openbsc/osmo_msc.h>
 #include <openbsc/sms_queue.h>
 #include <openbsc/vty.h>
+#include <openbsc/bss.h>
 
 #include "../../bscconfig.h"
 
@@ -55,10 +56,6 @@
 #define DB_SYNC_INTERVAL	60, 0
 static struct osmo_timer_list db_sync_timer;
 
-extern int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *),
-				 const char *cfg_file);
-extern int bsc_shutdown_net(struct gsm_network *net);
-
 static void create_pcap_file(char *file)
 {
 	mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
@@ -207,11 +204,6 @@
 	osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL);
 }
 
-extern int bts_model_unknown_init(void);
-extern int bts_model_bs11_init(void);
-extern int bts_model_nanobts_init(void);
-extern int bts_model_rbs2k_init(void);
-extern int bts_model_hslfemto_init(void);
 void talloc_ctx_init(void);
 
 extern enum node_type bsc_vty_go_parent(struct vty *vty);
@@ -237,12 +229,7 @@
 
 	osmo_init_logging(&log_info);
 
-	bts_model_unknown_init();
-	bts_model_bs11_init();
-	bts_model_nanobts_init();
-	bts_model_rbs2k_init();
-	bts_model_hslfemto_init();
-
+	bts_init();
 	e1inp_init();
 
 	/* This needs to precede handle_options() */