Two dimensional twin T-graphene: monolayer for visible-light photocatalytic water splitting and bulk for anode material of magnesium batteries