libopenflow: Fix longstanding match bug

Setting the nw_dst to None (wildcarding it) would reset the nw_src.  Oops.
libopenflow: Make None comparisons use identity
nx: Add NXM size-hinting

Formerly, things like register moves could guess the number of bits to
copy, but did so based on the number of bytes in the nxm_entry (just
multiplying it by 8).  This doesn't work for fields with sizes that
aren't multiples of 8, so they had to be specified by hand.  This lets an
nxm_entry subclass set _size_hint or override _get_size_hint() to
make it whatever it wants.
packet: Improve MPLS support

* Includes MPLS in __init__
* Handles decoding of nested labels
* Adjust MPLS ethertype string conversion to be consistent with constant
* Tighter stringizing for MPLS
nx: Make nx_match easier to use

It can be confusing when you set an attribute on nx_match which doesn't
actually correspond to an NXM type.  You end up just creating a worthless
attribute which doesn't actually contribute to the match and which doesn't
generate any error.

This patch "locks" the nx_match after it's created, so trying to write new
attributes will raise an exception, alerting one to the fact that one's
intention is not going to be honored.

Note: We have seen similar bugs in the wild with ofp_match too -- it might
make sense to do something similar there as well.
nx: Don't alter attribute name in nx_match

Previously, we used an attempted "fixed" attribute name in the fall-through
case of nx_match (when there's no corresponding match type), so either
a new attribute may end up with a weird name, or the exception text
referred to a name that wasn't the one the user actually used.  Fixed.
nx: In nx_match, do magic with OXMs as well as NXMs

We previously only did all the magic attributes in nx_match with names
starting with "NXM_".  We might as well do it with "OXM_" names too.
nx: Add MPLS push and pop actions
nx: Add MPLS match types from OpenFlow 1.2+.

Technically these don't belong in NX, since they're from OpenFlow 1.2 and
1.3 and not Nicira Extensions.  They work with OVS, though, and OVS
doesn't define its own equivalents, so we'll put them in here at least
for now.  When we have real 1.2 support, maybe we should move them.
of_01: Improve error logging on socket bind failure

I actually have absolutely no idea what I was thinking with some of the
previous version of this code from 065f5f4724 and #62.  It kind of looks
like I half-finished it and called it done or something.  Hopefully this is
an improvement.
tests: Make __init__ work without core

As previously referenced, I am not sure this file actually does anything
useful anyway.
ioworker: Fix socket connections on Linux

Apparently when a socket connects, Linux marks a socket as ready to
receive and then returns EAGAIN on a zero-length read.  This seems to be
similar to the Windows behavior, and we now treat them the same way.

This should fix a problem reported by github user xdhanz.
core/boot: Change how shutdown works

This isn't lovely (yet).  Basically, core now creates a condition which
it sets when it quits.  Currently, this is used by the "normal" main
thread (that is, not the Tk or interactive ones).  Rather than poll and
do a lot of sleeping, it now waits on the quit condition so that it can
exit much more quickly.

This also (sort of) adds a "starting up" state to core, which it really
should have had forever, and should really be part of sensible state
management, but for the moment is just a flag.
misc.switch_info: Include port info
Switch to Apache license

This finally changes all the remaining source files to Apache.
datapaths: Improve log message

Log message now indicates that it's attempting to connect and the address
it's attempting to connect to.
datapaths: Rename address arg; add default address

The address argument on the commandline used to be "addr", which is not
consistent with elsewhere in POX.  Changed to "address".

Also, address now defaults to 127.0.0.1.  I'm not positive this is a good
idea.  Unless you're careful (--no-openflow), this means it'll probably
connect to itself.
tests: Fix Nicira MPLS pop action test
core: Add hack to initialize core for tests

Some tests were failing because they expected core to be initialized,
which, as of 333fe0f6b, has to be done explicitly.

This isn't a good fix, but works for the moment.
addresses: Add IPAddr6 class for IPv6 addresses

This is part of experimental IPv6 support and partially addresses
issue #35.