Added netmask2cidr function

This function help to convert network mask to cidr notation.