Implement more rigorous rules for weighted avg
Implement more rigorous rules for weighted avg

This includes rules for automatic scaling of errors
and determination of unknown additive errors.
General function weighted_mean is also added.

rouckas/lib22pt