Geometry provides insight and classical inequalities afford easy access to rigor.
Geometric solution
We know, from the geometry of least squares, that $\mathbf{\bar{x}} = (\bar{x}, \bar{x}, \ldots, \bar{x})$ is the orthogonal projection of the vector of data $\mathbf{x}=(x_1, x_2, \ldots, x_n)$ onto the linear subspace generated by the constant vector $(1,1,\ldots,1)$ and that $\sigma_x$ is directly proportional to the (Euclidean) distance between $\mathbf{x}$ and $\mathbf{\bar{x}}.$ The non-negativity constraints are linear and distance is a convex function, whence the extremes of distance must be attained at the edges of the cone determined by the constraints. This cone is the positive orthant in $\mathbb{R}^n$ and its edges are the coordinate axes, whence it immediately follows that all but one of the $x_i$ must be zero at the maximum distances. For such a set of data, a direct (simple) calculation shows $\sigma_x/\bar{x}=\sqrt{n}.$
Solution exploiting classical inequalities
$\sigma_x/\bar{x}$ is optimized simultaneously with any monotonic transformation thereof. In light of this, let's maximize
$$\frac{x_1^2+x_2^2+\ldots+x_n^2}{(x_1+x_2+\ldots+x_n)^2} = \frac{1}{n}\left(\frac{n-1}{n}\left(\frac{\sigma_x}{\bar{x}}\right)^2+1\right) = f\left(\frac{\sigma_x}{\bar{x}}\right).$$
(The formula for $f$ may look mysterious until you realize it just records the steps one would take in algebraically manipulating $\sigma_x/\bar{x}$ to get it into a simple looking form, which is the left hand side.)
An easy way begins with Holder's Inequality,
$$x_1^2+x_2^2+\ldots+x_n^2 \le \left(x_1+x_2+\ldots+x_n\right)\max(\{x_i\}).$$
(This needs no special proof in this simple context: merely replace one factor of each term $x_i^2 = x_i \times x_i$ by the maximum component $\max(\{x_i\})$: obviously the sum of squares will not decrease. Factoring out the common term $\max(\{x_i\})$ yields the right hand side of the inequality.)
Because the $x_i$ are not all $0$ (that would leave $\sigma_x/\bar{x}$ undefined), division by the square of their sum is valid and gives the equivalent inequality
$$\frac{x_1^2+x_2^2+\ldots+x_n^2}{(x_1+x_2+\ldots+x_n)^2} \le \frac{\max(\{x_i\})}{x_1+x_2+\ldots+x_n}.$$
Because the denominator cannot be less than the numerator (which itself is just one of the terms in the denominator), the right hand side is dominated by the value $1$, which is achieved only when all but one of the $x_i$ equal $0$. Whence
$$\frac{\sigma_x}{\bar{x}} \le f^{-1}\left(1\right) = \sqrt{\left(1 \times (n - 1)\right)\frac{n}{n-1}}=\sqrt{n}.$$
Alternative approach
Because the $x_i$ are nonnegative and cannot sum to $0$, the values $p(i) = x_i/(x_1+x_2+\ldots+x_n)$ determine a probability distribution $F$ on $\{1,2,\ldots,n\}$. Writing $s$ for the sum of the $x_i$, we recognize
$$\eqalign{
\frac{x_1^2+x_2^2+\ldots+x_n^2}{(x_1+x_2+\ldots+x_n)^2} &= \frac{x_1^2+x_2^2+\ldots+x_n^2}{s^2} \\
&= \left(\frac{x_1}{s}\right)\left(\frac{x_1}{s}\right)+\left(\frac{x_2}{s}\right)\left(\frac{x_2}{s}\right) + \ldots + \left(\frac{x_n}{s}\right)\left(\frac{x_n}{s}\right)\\
&= p_1 p_1 + p_2 p_2 + \ldots + p_n p_n\\
&= \mathbb{E}_F[p].
}$$
The axiomatic fact that no probability can exceed $1$ implies this expectation cannot exceed $1$, either, but it's easy to make it equal to $1$ by setting all but one of the $p_i$ equal to $0$ and therefore exactly one of the $x_i$ is nonzero. Compute the coefficient of variation as in the last line of the geometric solution above.
The sum standard deviation is, as the name suggests, the standard deviation of the sum of $n$ random variables. The standard error you're talking about is just another name for the standard deviation of the mean of $n$ random variables. As you noted, the two formulas are closely related; since the sum of $n$ random variables is $n$ times the mean of $n$ random variables, the standard deviation of the sum is also $n$ times the standard deviation of the mean:
$\sigma_{X_{sum}} = \sqrt n\sigma_X = n \times \frac{\sigma_X}{\sqrt n} = n\times \sigma_\bar{X}$.
In the first problem you are dealing with a mean, the average of twelve bottles, so you use the standard deviation of the mean, which is called standard error. In the second problem you are dealing with a sum, the total weight of 20 packages, so you use the standard deviation of the sum.
Summary: use standard error when dealing with the mean (averages); use sum standard deviation when dealing with the sum (totals).
Best Answer
The primary assumption (which is often very reasonable) is that the measurement errors are independent, identically distributed, and conditionally independent on the true value of the variable of interest. With electronic devices, this is often the case.
So denote the 'true' distance variable $X_d$, the measurement error random variable $X_p$, and you observe a joint variable, $X_x=X_d+X_p$. You are asking for an estimate of $X_d$ which is corrupted with measurement error. So $\mu_x=\mu_d+\mu_p$ whose expected value is $E[X_x]=E[X_d + X_p] = E[X_d]+E[X_p]$ under independence. If your measurement error is zero-centered (that is, the measurement is unbiased) than $E[X_p]=0$, therefore $E[X_x]=E[X_d]$ and your best estimate is $\hat{X_d}=\hat{X_x}= \frac{1}{n}\sum{x_x^i}$. So basically, if you can assume zero centered, independent measurement errors, the best estimate of $\mu_d$ is the mean of your measurements.
Also, the variance of two independent random variables is the sum of the two individual variances. You can think of the variance of your data as representing $\hat{\sigma_x^2}=\frac{1}{n-1}\sum{(x_x^i-\bar{x})^2}$. Now we know $\sigma_x^2 = \sigma_p^2+\sigma_d^2 \to \sigma_d^2=\sigma_x^2-\sigma_p^2$. We have the estimator $\hat{\sigma_x^2}$ and we know $\sigma_p^2$, therefore our estimator $\hat{\sigma_d^2}=\hat{\sigma_x^2}-\sigma_p^2$.