Fix race condition in BgpPeer close procedure.

The BgpPeer destructor sometimes asserts because all paths added
by the peer have not been deleted i.e. the refcount_ in BgpPeer
is non-zero.

Root cause is that the BgpPeer could get closed before it's been
registered to all VPN tables. Since the peer is not registered to
the VPN tables, routes from the peer that were added to the VPN
tables do not get deleted during the close procedure.  Note that
BGP processes updates and adds routes into appropriate tables w/o
wating for table registration to be complete.

Fix is to keep track of whether VPN tables have been registered.
If VPN tables have not been registered when the peer needs to be
closed, kick off the registration and defer the close procedure.
The close will eventually resume when registration for all tables
is complete.

The changes to BgpPeerTest and bgp_peer_close_test are needed as
the bgp_peer_close_test registers to membership manager directly
without actually establishing the BgpPeer.

Change-Id: I58300e36d048902709343860066eb2ffdc4dca73