Energetics and mechanism of the solid-state polymerization of diacetylenes