Cleanup, fixes and small UI tweaks for Scene Debug

- Got rid of globals! Thanks to CoDEmanX in blender.stackexchange.com
- UI tweaks for List Cycles Materials, get them into a box, 1 liner, and let lamps list be first (used more often)
- Some fixes and cleanup