Cosmological relevance of scaling solutions: A recipe for quintessential inflation