[SPARK-4075][SPARK-4434] Fix the URI validation logic for Application Jar name.

This PR adds a regression test for SPARK-4434.
This comment is wrong. The URI fails validation because it doesn't have a path, not because it doesn't have an authority (which it does).