Incorporation of the statistical multi-fragmentation model in PHITS and its application for simulation of fragmentation by heavy ions and protons