v3:Make qinisettings a base class and force all operations through class methods

Continuing from pull request #430

**WARNING:** Merge this last. Otherwise the master will not compile until all my patches are merged.

I was going to make a separate branch/request for each of my commits but it doesn't work. Four of my commits are following in pull requests. The rest of the patch needs to be rebased on those. I will proceed when those 4 are merged.