The average rate on a 30-year mortgage rose to 6% this week, Freddie Mac says, ending a three-week slide