Convert from newtype to lens

We were using the `newtype` package in several places; since it's now entirely superseded by `lens` this patch converts from the former to the latter.  This will be a breaking change since in particular the type of `pathTrails` is now different (it was a field accessor and is now an `Iso`).  Maybe that's not a good idea and we should leave `pathTrails` for backwards compatibility, and provide something like `pathTrailsIso` instead?  What do people think?

There are probably still many ways the code could be cleaned up, we could make better use of what `lens` offers, etc.