Issue #1798724 by andreiashu, Albert Volkman, alexpott: Convert drupal_js_cache_files() to State system.

PR for https://drupal.org/node/1798724