The country’s biggest brokerages said they’re looking to expand even as slowing real estate activity leads them to lay off workers and cut expenses to survive the pandemic. That cost pressure could make mergers more likely in the coming year, industry professionals say.