A memorial to Tamils killed in Sri Lanka's civil war is to be rebuilt after protests over its demolition.