Speed up InputType::isInvalid() & InputType::isValidValue() a bit and clean up the code slightly.
Pull request: https://github.com/WebKit/WebKit/pull/12942
<rdar://problem/108580070>