How a frozen housing market, an outdated fee model and a new generation of tech-forward brokerages combined to push REMAX into a sale.