I'm having a go at revising the Path API to have fewer allocations built in.

But its a bigger job than alexcrichton might have realized, because some clients (e.g. rustpkg) are taking advantage of the fact that the accessors return owned strings.  Its not hard to fix, but just a bigger job and probably worthy of a separate ticket.  I don't think it should block landing lkuper's work here.