Luminosity functions of local infrared galaxies with AKARI : implications for the cosmic star formation history and AGN evolution.