mod_base: Add z_stream_restart() function to zotonic-1.0.js

When the session cookie changes (e.g. when doing an inline login
without a page refresh), the WebSocket stream needs to be restarted to
pick up the new cookie, otherwise the stream keeps using the previous
cookie for subsequent messages.
(cherry picked from commit d7ecb70c6ec29798e8e0b4a9c4cc15157b351517)