Updated the network helper API to use uint32_t and standard allocation/duplication routines, dropping the GLib include from the implementation and adding <stdint.h> to the header.
- Removes need to check for malloc failure
- Removes need for NULL checks on free
- Adds checks for integer overflows
- Removes some extra memset calls
- Removes chance of mixing libc and glib malloc/free