Don't SELECT * just to check if a project exists

Closed yorickpeterse-staging requested to merge project-url-constrainer-select into master

What does this MR do?

This adds a small optimisation to ProjectUrlConstrainer so we don't perform a SELECT * when we only care about whether or not a row is returned.

Does this MR meet the acceptance criteria?