Fix cleanup on exit
Fix cleanup on exit

When exiting, the extension need to be unloaded before release the
capture state. This is needed if for instance during the cleanup some
packets are dropped. Releasing the Lua state should unloaded all loaded
extensions.

Wingless-Archangel/haka,nabilbendafi/haka,LubyRuffy/haka,lcheylus/haka,Wingless-Archangel/haka,lcheylus/haka,haka-security/haka,nabilbendafi/haka,lcheylus/haka,haka-security/haka,haka-security/haka,LubyRuffy/haka,nabilbendafi/haka