ofctl_v1_2/3: IPv4 dotted decimal subnet mask support

This enables to_match_ip() to accept IPv4 address with dotted decimal
subnet mask or ACL hybrid CIDR.

Given 3 match field values below:

    '192.168.1.0/24'
    '192.168.1.0/255.255.255.0'
    '192.168.1.0/0.0.0.255'

These addresses are logically equivalent.

Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2/3: Convert IP fields to string with dotted decimal mask

This enables match_ip*_to_str() functions to output IP address with
dotted decimal subnet mask if the mask cannot be represented in CIDR
format.

Reported-by: Yi-Ching Lee <potatoching11@gmail.com>
Reported-by: Li-Der Chou <cld@csie.ncu.edu.tw>
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ofctl_v1_2/3: IP arbitrary bitmask support

Openflow 1.1 and later versions allow the use of IP address with
arbitrary bitmask in match fields. This introduces new match fields
for arbitrary bitmask support in REST API.

Newly added fields are:
    nw_src_w, nw_dst_w, ipv4_src_w, ipv4_dst_w,
    arp_spa_w, arp_tpa_w, ipv6_src_w, ipv6_dst_w.

These fields can be filled with only dotted decimal mask (for IPv4)
or colon-hexadecimal mask (for IPv6), and it always override mask
value in the relative match field which has no '_w' suffix.

For examples,

1.  "match": {"dl_type": 2048,
              "nw_src": "192.168.1.2",
              "nw_src_w": "0.255.0.255"}

In this case, the flow has "nw_src" with value "0.168.0.2/0.255.0.255".

2.  "match": {"dl_type": 2048,
              "nw_src": "192.168.1.2/255.255.255.0",
              "nw_src_w": "0.255.0.255"}

The flow also has "nw_src" with value "0.168.0.2/0.255.0.255" while
original mask defined in "nw_src" has been overridden by "nw_src_w".

If "nw_src" did not exist in match fields, "nw_src_w" is ignored.

Reported-by: Yi-Ching Lee <potatoching11@gmail.com>
Reported-by: Li-Der Chou <cld@csie.ncu.edu.tw>
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>