Fix production mode theme and widgetset compilation

The theme is now compiled only for the production mode.
The widgetset module is extracted from the server WAR and
recompiled for production mode.