Add DHCP utils extracted from DhcpClient

DhcpClient can then be migrated to at least DhcpSocketFactory, and
eventually DhcpPacketListener.
These classes will be used to implement the new DhcpServer.

FdEventsReader is PacketReader with generic T instead of byte[], to
allow reading both received payload and source IP from a UDP socket with
Os.recvfrom().

Bug: 109584964
Test: runtest --no-hidden-api-checks frameworks-net
Change-Id: Idd7dc36938748af701b45f50bde76a2592c9bfdd
3 files changed