Two-dimensional carbon-based heterostructures as bifunctional electrocatalysts for water splitting and metal–air batteries