Add missing type spec for the next_arg variable
Free stdout/stderr data when no longer needed in the swap plugin
Add the bd_loop_get_loop_name function
Add the bd_loop_setup function
Add the bd_loop_teardown function
Tests for the newly added loop_* functions