LoanDepot's tech investment drives record quarter.