Make audio devices save to settings

Also, revamp the settings dialog code and make it use signals and slots
a bit better.