Resize event handler: Changed into a plugin to keep the vapour object as lean as possible

Also updated theme.js accordingly. Now plugins just need to listen for the events on the document object rather than have to register a callback.