The chemical evolution of the solar neighborhood. II - The age-metallicity relation and the history of star formation in the galactic disk