Structure, charge transfer, and superconductivity of M-doped phenanthrene (M = Al, Ga, and In): A comparative study of K-doped cases