fixes #2851 - refresh puppet classes on environment change

@abenari, please review.  I think it was accidentally changed in 89b9ecb0, or maybe you were going to redesign hostgroup/env changes on the form?