Changed way URLs are captured for forms

First, made edit client and delete projects use a locally captured URL
rather than the session as they were interfering with the wider
functionality.

Second, moved the checking into the global captureURL function to only
capture if on the first visit to a form.

Net result is that now once a user hits a form for the first time, the
referring URL is captured, and remains intact while the user gets the
data right and changes client so they are returned to the correct page
on completion.