fixes #3097 - foreign key error on deleting trend
Fixes #2586 - Revert "Refs #2002 - Fog quick hack"

This reverts commit d37be454fa99c808acf7a89507ee6fd714f139de.
The original commit is not needed becase fog was upgraded.
fixes #3093 - invalid data for a subnet address or mask returns "is invalid and is invalid"
fixes #2764 - settings defined in settings.yaml file are now read-only
fixes #3094 - reports search includes hostgroup and hostgroup_fullname