Performance of the ATLAS hadronic end-cap calorimeter in beam tests