Luminosity and Stellar Mass Functions of Local Star-forming Galaxies