Fixes subnets represetations using slash notation

The ipv4 representation was only accepting slash notation with masks
represented in 2 digits. In the ipv6 implementation several fixies were
made: The maximun value to a bitmask was set to 64 which is not the reality
as ipv6 can handle 128 bits. The second change was also to enable mask
representation with more and less than 2 digits. A more general fix was added
to allow make the unit tests to work even if a invalid ip was informed during
the creation of the "tree", checking if the tree is NULL while performing the
execution of the operator.
Initial problem was reported at the issue: #706.