The CaloCube calorimeter for high-energy cosmic-ray measurements in space: Performance of a large-scale prototype