Uncertainty quantification for nonconvex tensor completion: Confidence intervals, heteroscedasticity and optimality