The average rate for a 30-year fixed-rate mortgage fell to 2.88 percent last year, according to the government-sponsored mortgage-finance company Freddie Mac.