The classical limit of W-algebras