src: refactor EndsInANumber in node_url.cc and adds IsIPv4NumberValid
Removes the use of vector in EndsInANumber and uses IsIPv4NumberValid instead of parsing the number to check if it is valid.
Fixes: https://github.com/nodejs/performance/issues/36 Refs: https://github.com/ada-url/ada/pull/36