Fix two CSubNet constructor problems:
- The use of
/xwhere 8 does not divide x was broken, due to a bit-order issue - The use of e.g.
1.2.3.4/24where the netmasked bits in the network are not 0 was broken. Fix this by explicitly normalizing the network according to the bitmask.
Also add tests for these cases.
Fixes #6179. Thanks to @jonasschnelli for reporting and initial fix.