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.
Merge pull request #9765 from s0undt3ch/2014.1

VT fixes
`child_fd` is not a file handle!
Check for boolean values first. Fixes #9742.

Instead of raising `RuntimeError`, raise `TerminalException`.
Merge pull request #9779 from s0undt3ch/2014.1

[2014.1] VT Fixes
fileserver/roots.py: rm unused import of `time` module

************* Module salt.fileserver.roots
salt/fileserver/roots.py:11: [W0611(unused-import), ] Unused import time
correct docs inaccuracy
Make the yumpkg5 module MUCH faster

benchmarked with a state with 52 packages

- before
real	0m58.023s
user	0m37.749s
sys	0m10.262s

- after
real	0m9.650s
user	0m6.192s
sys	0m1.728s