IPv6 support for php-fpm (fixes: #55508)

This removes hardcoded IPv4 code and adds support for IPv6
@jpauli if the user enters an ipv6 address with the [ip]:port format those [ and ] have to be removed. This line you pointed just deletes the ] in the last char and the next line `addr++;` deletes the [ in the first char