Rising interest rates and a slowdown in originations this year have led to a number of layoffs in the mortgage sector.