fixes #359 - hostname spoofing for unattended installation templates
fixes #3920 - prevent 500 ScopedSearch errors on the API, raise UI errors correctly
fixes #3925 - create apipie param_groups for API v2 to DRY documentation
Drop route_error leftovers, unused code

Use error_layout to wrap API v2 errors