Residual activity induced by heavy ions and beam-loss criteria for heavy-ion accelerators