More refactoring for PacketRegistry

Moved the inlined functions from header to source. If they become a
performance problem, we can deal with it later.

Renamed get_func to a more descriptive get_handler_callback (ditto for
get_func_v2).

Normalized the name of isDefined() -> is_defined().
Changed PacketRegistry namespace to Network