Microscopic mechanism of charged-particle radioactivity and generalization of the Geiger-Nuttall law