Refactor from global variable to RenderSettings

This uses bpy.types.RenderSettings to store data, eliminating the #XXX UGLY
marker previously required.