Dvogonen/making settings type safe

This is now completely finished and ready for merge to next.
All the function names are consistent.
Every permanent setting is serialized to file a protected by a storage object.