fixes #3515 - API handles not found objects with 404
Fixes #4022: Make api puppetrun a PUT for REST standards
fixes #2231 - hostgroup deletion is restricted to hostgroups without children