caches.{fscache,fsworker}: put __main__ code into funcs to avoid var shadowing

************* Module salt.caches.fscache
salt/caches/fscache.py:24: [W0621(redefined-outer-name), FSTimer.__init__] Redefining name 'opts' from outer scope (line 276)
salt/caches/fscache.py:61: [W0621(redefined-outer-name), FSCache.__init__] Redefining name 'opts' from outer scope (line 276)
************* Module salt.caches.fsworker
salt/caches/fsworker.py:111: [W0621(redefined-outer-name), FSWorker.run] Redefining name 'context' from outer scope (line 145)
Merge pull request #15362 from hulu/cache-tests

caches.fs{cache,worker}: put main code into funcs to avoid shadowing