Effect of capping ligands on the optical properties and electronic energies of iron pyrite FeS2 nanocrystals and solid thin films