[lib] add deepcopy()
[lib] add deepcopy()

deepcopy implementation from http://lua-users.org/wiki/CopyTable, with added
naive ctype support. C pointers are not properly copied.

Signed-off-by: Nikolay Nikolaev <5fb6ff14f2a3b931c007d120a649a55e86928f6a@virtualopensystems.com>

fhanik/snabbswitch,fhanik/snabbswitch,mixflowtech/logsensor,eugeneia/snabbswitch,wingo/snabb,SnabbCo/snabbswitch,mixflowtech/logsensor,virtualopensystems/snabbswitch,alexandergall/snabbswitch,pirate/snabbswitch,plajjan/snabbswitch,javierguerragiraldez/snabbswitch,plajjan/snabbswitch,Igalia/snabb,eugeneia/snabb,heryii/snabb,pirate/snabbswitch,dpino/snabb,wingo/snabb,Igalia/snabbswitch,Igalia/snabb,wingo/snabbswitch,dpino/snabb,Igalia/snabbswitch,eugeneia/snabb,heryii/snabb,hb9cwp/snabbswitch,andywingo/snabbswitch,kbara/snabb,aperezdc/snabbswitch,dpino/snabb,plajjan/snabbswitch,andywingo/snabbswitch,Igalia/snabb,alexandergall/snabbswitch,javierguerragiraldez/snabbswitch,dwdm/snabbswitch,xdel/snabbswitch,kbara/snabb,dwdm/snabbswitch,kbara/snabb,snabbco/snabb,justincormack/snabbswitch,Igalia/snabb,xdel/snabbswitch,lukego/snabb,wingo/snabbswitch,alexandergall/snabbswitch,heryii/snabb,lukego/snabbswitch,snabbco/snabb,pavel-odintsov/snabbswitch,dpino/snabb,plajjan/snabbswitch,andywingo/snabbswitch,pirate/snabbswitch,wingo/snabb,lukego/snabbswitch,lukego/snabbswitch,alexandergall/snabbswitch,aperezdc/snabbswitch,Igalia/snabbswitch,alexandergall/snabbswitch,fhanik/snabbswitch,virtualopensystems/snabbswitch,snabbco/snabb,snabbco/snabb,lukego/snabb,dpino/snabb,wingo/snabb,kbara/snabb,wingo/snabbswitch,dpino/snabbswitch,mixflowtech/logsensor,Igalia/snabbswitch,alexandergall/snabbswitch,kbara/snabb,eugeneia/snabbswitch,heryii/snabb,dpino/snabb,mixflowtech/logsensor,Igalia/snabbswitch,eugeneia/snabb,eugeneia/snabbswitch,SnabbCo/snabbswitch,kellabyte/snabbswitch,wingo/snabbswitch,javierguerragiraldez/snabbswitch,heryii/snabb,kbara/snabb,snabbco/snabb,kellabyte/snabbswitch,kellabyte/snabbswitch,wingo/snabb,lukego/snabb,heryii/snabb,pavel-odintsov/snabbswitch,snabbnfv-goodies/snabbswitch,Igalia/snabb,Igalia/snabb,virtualopensystems/snabbswitch,eugeneia/snabb,hb9cwp/snabbswitch,eugeneia/snabb,SnabbCo/snabbswitch,andywingo/snabbswitch,hb9cwp/snabbswitch,dwdm/snabbswitch,Igalia/snabb,dpino/snabbswitch,pavel-odintsov/snabbswitch,snabbnfv-goodies/snabbswitch,snabbnfv-goodies/snabbswitch,mixflowtech/logsensor,hb9cwp/snabbswitch,snabbnfv-goodies/snabbswitch,wingo/snabb,eugeneia/snabb,justincormack/snabbswitch,snabbco/snabb,eugeneia/snabbswitch,aperezdc/snabbswitch,dpino/snabb,alexandergall/snabbswitch,justincormack/snabbswitch,SnabbCo/snabbswitch,lukego/snabb,alexandergall/snabbswitch,dpino/snabbswitch,eugeneia/snabb,snabbco/snabb,snabbco/snabb,xdel/snabbswitch,aperezdc/snabbswitch,dpino/snabbswitch,lukego/snabbswitch,justincormack/snabbswitch,eugeneia/snabb,Igalia/snabb