mod_filestore: fixes for cache sync, sql fix and reset of filestore flags after upload.

(cherry picked from commit ecf5bf34ffb7c8b9c0000892c4034185dff50a34)
core: set 'infinity' timeout on the z_template_indexer:find_all gen_server call.
This prevents the z_mediaclass from crashing (and others as well) during high load and rescanning.

(cherry picked from commit 3f87d7ac6bc532aea160cfd298e61e30137edb16)