The transition from a pseudogapped metal to an insulator: photoemission and optics of (TMTSF)2ReO4