Thermodynamic parallels between solid-state amorphization and melting