fixes #1804 - find hosts through nested hostgroups on puppet class search

The second commit (refs #2189) is optional since it's already fixed, but I thought while I was in here I'd add some more factories for parameters and make the tests a bit more explicit.