Allow CIDR notation in ipv4/ipv6 addresses.

This is imported from Claudyus' commit.

Use the same regex for form and validation.

Ipv4 regex are based on http://blog.markhatton.co.uk/2011/03/15/regular-expressions-for-ip-addresses-cidr-ranges-and-hostnames/ post

Additional things added in Pyramid version:

Also, removed second column with regex from CGROUP_EXT as I am not using this column in my version, my regexes are defined in the WTForms form class instead.

Also moved the regexes to forms.py, because it's the only place they are actually being use anyway.

Also, pre-compile regexes to gain some extra speed, WTForms allows you to give it either a string for a regex, or a precompiled regex object.. it supports both.