This patch adds a copy_logs as the handler with unittest's addOnException,
by doing this, we can get logs for all failed cases instead of copy them
before teardown.
If without any failed case, don't copy logs for saving time.
Partially implements: blueprint swarm-functional-testing
Change-Id: I47725d0d16735f650adf325adcf4194eb70c384d