Pass around win_id so we can use it in the error message handler

The message class needs a win_id to know where to send error messages. Just
pass it through the jinja->js->qtwebbridge as it's just a simple int.