After weeks of mortgage market weakness, loan applications rose last week, led by a rise in applications to buy a home.