Synchronize close methods in RIB and topology provider to avoid closing conflicts.

Change-Id: I758e55c932500189aead22dd858af140a93d3667
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit e8720b80736a53313a01c0381601d3a5ea43a170)