openflow: Fix new handshake event

This new event didn't call the superclass constructor.  Also adds .dpid
property consistent with other OpenFlow events.

Signed-off-by: Murphy McCauley <murphy.mccauley@gmail.com>
openflow.nicira: Use custom OF message handlers

The new OpenFlow message handler mechanism both broke the fairly
hacky way the nicira module used to hook vendor messages and also
allows for a more elegant solution.  This commit rectifies things.

Specifically, it creates a new handler subclass for switches with
Nicira extensions, which it enables in a ConnectionHandshakeComplete
handler.

Signed-off-by: Murphy McCauley <murphy.mccauley@gmail.com>
openflow: Tweak OpenFlowHandlers init

Rather than a hard-coded list of messages the handler is interested in,
we now generate this at runtime from ofp_type_map.

Signed-off-by: Murphy McCauley <murphy.mccauley@gmail.com>
openflow.nicira: Use single OF handler instance

Rather than creating a new instance of NiciraOpenFlowHandlers for
every connection, we now just create one and reuse it.  This avoids
the relatively expensive initialization process for each connection.
(We still pay this price for the handshake handlers, unfortunately,
but at least we don't pay it twice.)
openflow: Tweaks to OF handlers init

* Adds some assertions
* Avoid name collision with Python builtin "type"
* Minor other changes
openflow: Log aborted connections at DEBUG

If we never even get a DPID from a switch, we now log its disconnection
at DEBUG level instead of INFO.  We never logged a connect message at
INFO in this case anyway, and it's not uncommon to have fairly meaningless
disconnection messages like this anyway, particularly with Mininet since
it probes the controller to see if it's listening.