bgpd: simplify ebgp-multihop and ttl-security handling

Change to track configured value in ->ttl and ->gtsm_hops;
not the value set to sockopt. Instead, setting of socket's ttl
and minttl options are now merged to one function which calculates
it on demand. This greatly simplifies the code.
diff --git a/bgpd/bgp_network.h b/bgpd/bgp_network.h
index 1276843..31995ca 100644
--- a/bgpd/bgp_network.h
+++ b/bgpd/bgp_network.h
@@ -28,6 +28,7 @@
 extern int bgp_connect (struct peer *);
 extern void bgp_getsockname (struct peer *);
 
+extern void bgp_set_socket_ttl (struct peer *peer, int bgp_sock);
 extern int bgp_md5_set (struct peer *);
 
 #endif /* _QUAGGA_BGP_NETWORK_H */