W-algebras and Whittaker coinvariants