Ipv4 Decoder refactoring + Unit test changes

Change-Id: I0c860e17bcee1251a4a2a2729ee7500ab5271bbd
Signed-off-by: Aarti Lolage <aalolage@cisco.com>