Break circular shared_ptr cycle between chain_database and pending_chain_state