Ensure settings values are strings before saving

closes #2736
-reintroduces JSON.stringify for non-string values in
 api.settings.edit
-added a regression test
Merge pull request #2737 from jaswilli/issue-2736-pg

Ensure settings values are strings before saving