lib: implement CIDR subnetting

fix #12
0.3.0