tests: Fix tests of master server change during build

Some tests were failing when the master server was being killed under the load
of client's requests. It happened because some of them have been processed but
the responses haven't been sent to the client. This commit makes use of master
server's "stop" action with SAVE_METADATA_AT_EXIT config option to simulate
master server kills but with sending queued responses.

Change-Id: Ib335d0953c410a797eb4886cf20ad7fd78256b6e