Brazil’s share in the global market for the riskiest type of bank debt is dwindling as lenders turn to local financing for their borrowing needs even as foreign demand for the securities picks up.