[CLEANUP] Use "use strict" for the JavaScript files

Also clean up the JavaScript file a bit.

Resolves: #53981

Change-Id: Ib59c050a3af4ed24c7cddacdf7f208c9d29775d0
Reviewed-on: http://review.typo3.org/35111
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>