Optimal Multi-Distribution Learning