Puppetclasses minor updates

- Add Search functionality
- improved SQL queries on puppet class edit page
- cleanups

this requires a bit of UI review from @abenari