Add bgp_table_check() for debug purposes and other minor fixes.

  * bgpd/bgp_table.c

    New function bgp_table_check() walks a bgp_table and checks that
    for all nodes the children are consistent with their parent.

    This is invoked, if qdebug, in bgp_table_top().

  * lib/prefix.h & .c

    Added functions to check that a prefix is consistent with its
    prefix length -- ie no '1's beyond the prefix length.

    Note that maskbit[] is now Unused.

  * bgpd/bgp_ecommunity.c

    Initialise variables to avoid (spurious) compiler warnings.

  * bgpd/bgp_route.c

    Fix incomplete qassert() in bgp_rs_route_init().
Handling of BGP_INFO_REMOVED routes and other fixes.

Under some circumstances and for reasons unknown, it seems that after a
peer has gone down it is possble for some of its routes to become
"stuck", and to sit in BGP_INFO_REMOVED state -- and selected even !
And to resist all efforts to remove.

Changes here:

  * bgp_selection() changed so that if more than one route becomes
    BGP_INFO_SELECTED this will not get in the way of removing a
    route which is BGP_INFO_REMOVED and BGP_INFO_SELECTED.

    This is a possible, if apparently unlikely mechanism for a
    route becoming stuck.

    Also, bgp_selection makes sure that only one route is marked
    BGP_INFO_SELECTED, and that removes all other BGP_INFO_REMOVED
    routes.

  * bgp_announce_route_table() changed so that if the current
    BGP_INFO_SELECTED route is BGP_INFO_HOLDDOWN, then will
    withdraw the prefix rather than send the dead route.

    This allows "clear ip bgp soft out" to withdraw a route
    which is "stuck".

  * fix errors in bgp_table_check().

  * skip out unused maskbit[] in lib/prefix.c
Reduce convergence time and other fixes.

Update version to ex27b-

Fix crash in ex26b+ in route-map and set community.

Worked over the following to reduce overhead:

  * advertisement and advertisement attribute marshalling.

  * size of hash tables for all bgp objects.

Checked through all the lists which run through bgp_node, bgp_info,
bgp_adj_in and bgp_adj_out objects -- looking for any which could
be bent out of shape and cause routes to get "stuck" in
BGP_INFO_REMOVED state.

Reviewed all bgp hash usage, and regularised the definition and use of
the hash methods.

Changed to initialisation of peer->sync structures so that (a) does
not allocate hashes for unused address families, (b) allocates rather
larger hashes for used address families, (c) ensures that before a
new session starts, the adj-out side of things is entirely empty.

As an experiment, added "pools" for a number of high traffic objects.
This reduces the malloc/free overhead:

  * hash backets

  * bgp_advertise, bgp_advertise_attr and bgp_adj_out.

  * bgp_node and bgp_info.

  * streams and their data.

These improvements reduced the convergence time on my standard Route-Server
test by about 15%... so not huge, but something.

Merged the bgp_info_extra object into the bgp_info... the bgp_info_extra
includes the igp_metric -- so in many cases the "extra" will be required, and
the small memory saving in other cases does not appear worthwhile.
Diagnostics and recovery for HOLDDOWN/SELECETED issues.

In bgp_announce_route_table() if find:

  * more than one route which is SELECTED, then something
    is awry -- and the node had better be processed to
    sort that out.

  * a SELECTED route in HOLDDOWN state, then the node had
    better be scheduled for processing, to sort that out.

If in these cases the node is NOT scheduled to be processed, then will
now force the issue.

In any case, will produce error log messages.