Reduction Algorithms for the Multiband Imaging Photometer for Spitzer