core/lib.lua: add endian conversion helpers written in Lua

avoid C function call overhead while using C.xxxx counterparts
keyed_ipv6_tunnel: add missed conversion to network order for session id

use endian conversion helpers
packet_filter: use endian conversion helpers
keyed_ipv6_tunnel: add optional default_gateway_MAC config parameter
lib/macaddress: add error handling
Merge pull request #162 from logiceditor-com/aa/4147/test_tunnel_setup

L2TPv3/keyed_ipv6_tunnel: Test tunnel setup