Automatic Generation of High-Level State Features for Generalized Planning