Look for Configuration Files in Platform-Recommended Directories

Problem

Streamlit uses the home directory for its configuration, but that adds another config file to pollute a home directory. We should be good platform citizens and provide thoughtful locations for configuration files.

Solution

We as a team agreed on the following order:

  1. $PROJECT_FOLDER/.streamlit
  2. (great if possible, but not required) $PROJECT_FOLDER/{../}+.streamlit (i.e. any subfolder containing .streamlit)
  3. ~/.config/streamlit if Unix/macOS (or in $XDG_CONFIG_HOME, if defined), %CSIDL_COMMON_APPDATA%/streamlit if Windows (that's ProgramData, meaning we follow Git and Conda)
  4. ~/.streamlit

Additional context

See Closed Pull Request #1907