Fix couple of issues related to bgp_server_test.

Following changes are implemented:

- Shutdown the TcpServer right away instead of doing it from Config task
- Tweak CloseDeferred test to work around a race condition in the test

Change-Id: I55f54c415f399a5cc7b1d0bd6743d24bd44cc06f
Fix concurrency issue in processing passive BgpSessions.

Change-Id: I5a17ecc34f2e36f914cffda259af3957f527a8d6