Conductance Switching and Many-Valued Logic in Porphyrin Assemblies