fixes #2231 - hostgroup deletion is restricted to hostgroups without children
fixes #2728 - POST /api/hostgroups does not accept ancestry
set apiadmin user in headers before api controller tests
This commit adds most of the functionality required for API v1
The overall goal was to extract the existing JSON responseoverall controllers, and to move them to a seperate name space.