core: set the zotonic_dispatch_path to the path before an internal resource redirec.
docs: add documentation for zotonic_dispatch_path_rewrite var

(cherry picked from commit 095adac2d573d48e186d701a553d62a46f2d1f87)