workflows: further update JavaScript

* Refactors the way URLs are passed to JavaScript, adding
  a new context object used when initializing the JavaScript files.

* JavaScript files for widgets are now dynamically loading, instead of
  being hard-coded in templates. These files are now required to be
  listed in the widget WTForm definition.

Co-authored-by: Dinos Kousidis <konstantinos.kousidis@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>