Factor out Position.Transform; remove deprecated Warp class.

Clean up some hairy manipulations in GeneralFormationMatcher by factoring
out a clean `Transform` class which applies linear transformations to
`Position`s.  Also factor out `Position.toPoint()` which we can use in
many cases where we want to use Positions as map keys, but ignore
rotation and position flags.