Dendrite suppression by shock electrodeposition in charged porous media