Accurate condensed history Monte Carlo simulation of electron transport. I. EGSnrc, the new EGS4 version.