Don't extract components from invalid URLs

This CL fixes a crash where we'd get confused trying to extract a component
from an invalid URL. If the URL is invalid, the concept of a "component" is
basically meaningless, so we should just return early in lastPathComponent,
like we do for other components.

R=eseidel
BUG=254460

Review URL: https://chromiumcodereview.appspot.com/21138004

git-svn-id: svn://svn.chromium.org/blink/trunk@155135 bbb929c8-8fbe-4397-9dbb-9b2b20218538