Add cs_main lock to name_list.

Lock cs_main in name_list.  This prevents a potential deadlock, which
may occur when name_list is called in parallel to syncing.  name_list
used to lock the wallet and then wait on BDB's internal lock, while
updating the wallet with incoming blocks (CWallet::GetDebitInclName)
tried to lock cs_mapWallet while the DB was locked from the syncing
thread.