Fix Browser Shutdown Issue

Local database handle must be uninitialized only after all remotes are shut down. The code now is shutting it down twice, once as part of the loop where we uninitialize remotes, and again below the loop. It should be shut down only after all remotes are shut down.