Precise Calculation of the Dilepton Invariant-Mass Spectrum and the Decay Rate in $B^\pm \to \pi^\pm \mu^+ \mu^-$ in the SM