ofproto-dpif: Use sequence number to wake up main thread for
packet-in I/O.

This commit adds per 'struct ofproto_dpif' sequence number for
packet-in I/O.  Whenever ofproto_dpif_send_packet_in() is called,
the calling thread will change the sequence number to wake up the
main thread.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
bridge: Refactor the 'Instant' stats logic.

This commit refactors the 'Instant' stats related logic in bridge.c
by moving it into bridge_run().

This change brings the following effects:

1. bridge.c will wait on the global connectivity sequence number when
   there is no pending instant stats transaction.  and the main thread
   will no longer be waken up every 100 ms for 'Instant' stats check.
   the related overhead is eliminated.

2. the netdev's sequence number is used to avoid updating unchanged netdev
   status.  so, the update is more efficient.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>