(PUP-3644) Return 404 for v3 endpoints if indirection is not found
For v3 endpoints, the indirection is the first part of the url (after
the version), and the environment is a parameter. This commit makes it so
that an invalid indirection returns a 404 (matching what is done for v2), but
a missing environment returns a 400.
The url2indirection method for v3 now handles all checking of
validity of both the indirection and the environment. url2indirection now
returns the indirection, rather than just the indirection name.