Tidal evolution of cored and cuspy dark matter halos