GC 5.2 fixes

* Fix 'kv' tables being only half-cleared
* Fix bugs when combining weak tables and finalizers

Signed-off-by: katlogic <kat@lua.cz>