fixes #2810 - more restful API v2 JSON responses in puppetclasses

NOTE: breaking changes to API v2 api/lookup_keys does not exist, replaced by api/smart_variables and api/smart_class_parameters
(cherry picked from commit 21bf889acc5cb898a2f0888153e4aa46abe40cde)