Refactor config to be generic- closes https://github.com/balderdashy/sails/issues/577