Hydrogenation of Hydrogen Cyanide to Methane and Ammonia by a Metal Catalyst: Insight from First-Principles Calculations