gdhcp: Transaction id was not set when receiving L2 packet

The transaction id was always printed as 0x0000 in debug print.
gdhcp: Transaction id is in network byte order

Print xid in host byte order so that it is easier to match the
value to data in network packet.
gdhcp: Workaround for buggy AP that handle broadcast flag incorrectly

Some routers/AP handle the DHCP broadcast flag incorrectly.
This means that some AP discard the DHCP packet if broadcast
flag is present and some discard it if broadcast flag is missing.

The workaround is to first send DISCOVER packet in INIT state without
broadcast flag. If there is a timeout we send the second packet with
broadcast flag set. In a case of second timeout the next DISCOVER will
not set broadcast flag etc.

In REBOOTING state the REQUEST packet will not set the broadcast flag.
If we do not get a reply, we switch to INIT state anyway which will
set the broadcast flag.
Merge pull request #19 from hmallat/upstream-dhcp-fixes

Upstream dhcp fixes