Neutralization of long and short pulse ion beams