Possible fix for #1073, part 3

- Disable hooks in install controller and home controller (when not
installed).
- Update settings lib to not use the database if the settings table does
not exist (or the database is not connected).