_get_config_or_cache_dir() - behaviour according specification in _get_configdir() restored.

1. If an old config $HOME/.matplotlib exists it should be chosen also on Linux.

2. However, if the old config does not exist and xdg_home is None (can be the case in cluster environments) -> do not try to create directory in the non-existing home directory rather in the temporary directory.