Fix assign ip address with invalid values raise exception

Closes #11552 

In order that set attribute should not be bang method, rescue invalid ip address exceptions.

There is two options to resolve #11552 issue:

* remain invalid value as attribute value and rescue all exceptions on type casting, like I have proposed in this PR
* return default `IPAddr.new` value like `BigDecimal` does: `IPAddr.new 'invalid' #=> #<IPAddr: IPv6:0000:0000:0000:0000:0000:0000:0000:0000/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>`

What do you think about second solution?