virttest.standalone_test: Bring in funcatexit to standalone_test

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Merge pull request #310 from ypu/cleanup

virttest.standalone_test: Bring in funcatexit to standalone_test
virttest.funcatexit: Prevent weird errors while storing nasty args

Because all arguments are stored in env we have to ensure the arguments
are pickable before storing them. Otherwise users would get weird errors
pointing at env:
    TypeError: can't pickle ... objects

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.funcatexit: Prevent weird errors while storing nasty functions

Local functions are not pickable. Raise a sane exception when the test
tries to use them.

Global functions (defined on the module scope) are fine.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.standalone_test: Raise TestWarn when funcatexit fails

Since funcatexit are cleanup functions, make the test fail with
TestWarn and proceed with postprocess_on_error.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>