Add examples for GenericPath methods.

I wanted to use `assert_eq` throughout, but that does not seem possible (see #15625)
You can use `path::SEP`, but I would avoid `PosixPath` in the `GenericPath` documentation.