add flowmod priorities constants
refactor table constants
refactor dpid_to_mac and flow_to_port