Online Resource Allocation under Horizon Uncertainty