Remove duplicate positions from polylines.

For #898.
Shouldn't we keep the passed in value and return it in the `getter`?  The version with positions removed should be private.  It's generally a bad idea to have a getter that doesn't return the value assigned by the setter.