The average rate on a 30-year mortgage edged higher, ending a seven-week slide that helped ease borrowing costs leading into the spring homebuying season.