datapaths: packet_ins use correct sizes

Hopefully, this patch makes it so that we now limit packet_in data to the
correct length (either the table miss length or the length specified in
an action with an output to the controller).

Also cleans up send_packet_in() a little.
datapaths: Rewrite handling of switch features

This also removes some unused imports.
tests: Don't use count() for XID generation