backend_pgf: clip paths within the backend (fixes #1857)