Understanding the Activity of Carbon-Based Single-Atom Electrocatalysts from Ab Initio Simulations