An All-Optical Excitonic Switch Templated on a DNA Scaffold Operated in the Liquid and Solid Phases