Bring certain files in line with `develop`

This is in lieu of cherry-picking #9575
Searching the stack for a few other locations to find the sls name and template file. This allows us to use defaults.get from inside jinja templates
Cover more race cases when managing the file cache file
Add functions to interact with file list cache
Update file_lists cache support for roots backend

This builds on the work Tom started, using common functions for reading
and writing the cache, and also switching the cache location.
Additionally, this commit also optimizes the file list cache by creating
separate cache files for each environment. The desired environment is in
the load already, so there is no need to walk the other environments to
get the desired file_list data.
Fix pylint violation
Merge pull request #9748 from terminalmage/2014.1

Add additional file_lists cache commits to 2014.1
Add file_lists cache for gitfs
Merge pull request #9755 from terminalmage/2014.1

Add file_lists cache for gitfs (2014.1 branch)
Don't fail badly on setting VT screen size. Refs #9742.

We still need to be able to set the screen size within a multiprocessing
process.
Only try to set the terminal size if parent is a TTY
Catch all VT spawnign errors.

Fix the logging call and try to catch any errors occurring while
spawning the VT.
Make PyLint happier.