classifier: Change type used for priorities from 'unsigned int' to 'int'.

OpenFlow has priorities in the 16-bit unsigned range, from 0 to 65535.
In the classifier, it is sometimes useful to be able to have values below
and above this range.  With the 'unsigned int' type used for priorities
until now, there were no values below the range, so some code worked
around it by converting priorities to 64-bit signed integers.  This didn't
seem so great to me given that a plain 'int' also had the needed range.
This commit therefore changes the type used for priorities to int.

The interesting parts of this change are in pvector.h and classifier.c,
where one can see the elimination of the use of int64_t.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
classifier: Make classifier_lookup() 'flow' parameter non-const.

An upcoming commit will make classifier_lookup() sometimes modify its
'flow' argument temporarily during the lookup.

Signed-off-by: Ben Pfaff <blp@nicira.com>
---
v2: New patch.
[RFC] classifier: Add support for conjunctive matches.

A "conjunctive match" allows higher-level matches in the flow table, such
as set membership matches, without causing a cross-product explosion for
multidimensional matches.  Please refer to the documentation that this
commit adds to ovs-ofctl(8) for a better explanation, including an example.

Issues:

- Until now the conceptual model of a cls_rule has been that it is
  immutable while it is in a classifier.  This commit adds a "conjunctive
  match" (optional) to each cls_rule, and makes the new member safely
  mutable while it is in a classifier.  This might be a conceptual failing
  bad enough to need fixing; I am not sure.

- Needs some real tests; you can run the "test-conjunction" script inside
  "make sandbox", for now.

- The code needs some more comments.
---
v1->v2:
  - Use 1-based dimension numbers in formatted syntax, e.g. 1/2 and 2/2,
    not 0/2 and 1/2.
  - Add new conj_id field instead of overwriting reg0.
  - Since priority is now an 'int', get rid of awkward +1s and comparisons
    on priorities in classifier_lookup().
  - Fix memory leak in classifier_replace().
  - Modify conj_id in-place in classifier_lookup() instead of copying
    entire flow.
  - Remove prototype for nonexistent cls_rule_init_conjunction().
  - Fix memory leak in classifier_lookup(), and eliminate memory allocation
    in the common case of few conjunctive matches.