Issue #1574490 by frega, nod_: Clean-up: batch.js.

PR for https://github.com/backdrop/backdrop-issues/issues/211
Replacement PR for https://github.com/backdrop/backdrop/pull/291