Move _net_client_list / _net_client_stacking_list logic to lua, some
bugfixes