From Fourier series to infinite product representations of $\pi$ and infinite-series forms for its positive powers