mod_base: do not redirect if redirect id is set to undefined

(cherry picked from commit 3a7a7a7109d4c9a6b9106b7527850cbcfe601ee7)
mod_base: in do_popupwindow use e.preventDefault() to play nice with multiple click event listeners.

(cherry picked from commit 4f8dfc9952c3076fcc5f89098021037762eb9f7d)
mod_mqtt: fix js error in for loops.

(cherry picked from commit c6f33e0762262ad4362923fe180798f2e22954d5)
core: the {% script %} tag has now arguments.

(cherry picked from commit c2050536fadfac5ff0f0cb9091a44f22f85091b9)