python/ovs/db/idl.py: Transaction._substitute doesn't handle list/tuple

Since Transaction._substitute doesn't substitute elements of list/tuple,
setting list references results in transaction error. Teach it such case.

Example:
{"op": "update",
 "row":{"bridges":["set",[["uuid",
                           "1f42bc19-307f-42e7-a9c0-c12178bd8b51"],
                          ["uuid",
                           "f97e0c76-7146-489d-9bed-29bc704f65fe"]]]},
 "table": "Open_vSwitch",
 "where":[["_uuid", "==", ["uuid",
                           "20c2a046-ae7e-4453-a576-11034db24985"]]]}

In the above case, uuid in "row" aren't replaced by "named-uuid" because
the function doesn't look into elements of lists.
When list/tuple is found, look into elements recursively.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com then made substantial changes that were then:]
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: helper functions for of12 set-field action

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v7 (draft) [Simon Horman]
* Updated OXM comment in ofp12_action_set_field
* Use offset of 0 in set_field_format() as values are right-justified
* Remove OXM-only restriction in nxm_reg_load_from_openflow12_set_field()
* Rename set_field_to_nast() -> set_field_to_ofst()
  - nast: Nicira eXtension Action <something> Type
  - ofast: Open Flow Action <something> Type
* Provide helper function, nxm_reg_split(), to share code between
  nxm_reg_load_to_nxast() and learn_execute().

v6 [Simon Horman]
* Change ofp12_action_set_field so that the last element is
  ovs_be32 dst rather than uint8_t field[4].
  This avoids some casting when the field is used.
* Use is_all_zeros()
* Accept non-OXM fields in nxm_reg_load_from_openflow12_set_field()
* Leave nxm_reg_load_check() unmodified, the NXM checks should be sufficient
* Save subvalue right-justified in nxm_reg_load_from_openflow12_set_field()
* Add room for value and padding in nxm_reg_load_to_nxast()
* If outputing a flow using OpenFlow 1.1 or 1.2 then split any
  set-field actions into NXM load actions

v5 [Simon Horman]
* Do not add mf_check_dst_oxm(), just use mf_check_dst().

v4 [Simon Horman]
* Remove utilities/ovs-ofctl.c hunk, introduced in v3,
  which belongs in a different patch
* Make use of new oxm_writable field in struct mf_subfield
  to implement mf_check_dst_oxm(). This provides more
  strict checking than the previous implementation.
* Do not call pre-requisites explicitly in mf_are_prereqs_ok()
  - It will segfault as flow is NULL
  - It would be called by mf_is_value_valid() if
    flow was not NULL
* Correct byte-order issues in nxm_reg_load_from_openflow12_set_field()
* Add set_field_format() and use it in nxm_format_reg_load()
* Update to use mf_subfield

v3 [Simon Horman]
* Add (now) missing cases to nxm_reg_load_check()

v2 [Isaku Yamahata]
* First post

fix1

fix2
ofp-actions: plumb of12 actions support

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v6
* Add limited testss
  - Previously part of another patch which has otherwise been dropped

v5 [Simon Horman]
* No change

v4 [Simon Horman]
* Update call to ofpacts_pull_openflow11_instructions()
  in ofctl_parse_ofp11_instructions() to include new ofp_version argument
* Add a special case for OFPAT12_SET_FIELD to decode_openflow12_action()
  as it is a variable-width feild while all other fields are
  fixed-width.

v3 [Simon Horman]
* Manual Rebase
* Make use of enum ofp_version

v2 [Isaku Yamahata]
* First post
ofp-actions: Add parsing of set_field actions

Based heavily on work by Isaku Yamahata <yamahata@valinux.co.jp>

Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>