Structure and Optical Properties of Polymeric Carbon Nitrides from Atomistic Simulations