Add Nicira vendor extension action NXAST_DEC_TTL_CNT_IDS.

Currently, if a controller having a nonzero id registers to get a
OFPR_INVALID_TTL async message, it will not receive it.  This is because
compose_dec_ttl() only sent the invalid ttl packets to the default controller
id.  NXAST_DEC_TTL_CNT_IDS is a new action that accepts a list of controller
ids, each separated by `,', to which the OFPR_INVALID_TTL packets must be sent.
The earlier requirement of the controller having to explicitly register to
receive these asynchronous messages is retained.
The syntax of this action is:
    dec_ttl(id1,id2)
where id1, id2 are valid controller ids.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
(cherry picked from commit c2d967a562aaa57b679c302a5041d5a941154143)

Signed-off-by: Simon Horman <horms@verge.net.au>

Conflicts:
	include/openflow/nicira-ext.h
	lib/ofp-actions.h
	lib/ofp-parse.c
	lib/ofp-util.def
	ofproto/ofproto-dpif.c
	tests/ofp-actions.at
lib: support OF11 dec_nw_ttl

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[blp@nicira.com changed code to use "dec_ttl" instead of "dec_nw_ttl"]
Signed-off-by: Ben Pfaff <blp@nicira.com>
(cherry picked from commit 7bcb1506ee2de6a460db35404e642f21d8219b5f)

Signed-off-by: Simon Horman <horms@verge.net.au>

Conflicts:
	lib/ofp-actions.c
	lib/ofp-actions.h
	lib/ofp-parse.c
	lib/ofp-util.def
	tests/ofp-actions.at
ofp-actions: Use OpenFlow 1.2 set queue action when encoding actions

Use OpenFlow 1.2 set queue action when encoding actions.
This is achieved by sharing moving Open Flow 1.1 code so
that it is used by both Open Flow 1.1 and 1.2.

Previously a Nicira extension was used when encoding
set queue actions for OpenFlow 1.2.

Reported-by: Joe Stringer <joestringernz@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-actions: Correct handling of apply actions instruction

When stored in OFP actions the apply actions instruction is represented using
nested attributes.  This means that using OFPACT_FOR_EACH() will skip
to the next instruction as desired.

Previously the code assumed that nesting was not used and that
OFPACT_FOR_EACH() would merely skip to the second action inside the apply
actions instruction. To compensate for this ofpacts_insts_to_openflow11__()
returned the last OFP action that had been processed - the last action in
the case of apply actions instruction - and then skip to the next action.
Unfortunately this was merely the end marker of the nested attribute and
processing would end: prematurely if there were more instructions.

This patch simplifies the code by simply using OFPACT_FOR_EACH()
to skip over nested attributes.

This patch also adds a test case to exercise this condition.

Reported-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>