qemu.tests: Add clean up operations after tests in ksm_base

Quit ksm_overcommit_guest and turn on swap after test otherwise following
cases using this vm may failed because out of memory.

Also fix a small mistake in test steps.