WebPasswordFormData: only ask for the 'id' attribute if there is one

Adding a hasID() guard to a idForStyleResolution() call.
This caused a crash before.

Tests for the crash are in https://codereview.chromium.org/82703003.

BUG=322242,282487

Review URL: https://codereview.chromium.org/83323002

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