Lots of fixes, improvements etc

Hi,

I collected a lot of fixes, improvements and other changes here. Also included a class for collections of IP addresses that automatically merges IP ranges when adding new addresses (when possible) and also supports removing IP ranges from larger IP ranges.

I hope you can use them,
Sander