The bug was in the test case.
The problem was that maria_empty_logs.inc deleted aria log files before
the server was properly shutdown.
Fixed by waiting for pid file to disappear before starting to delete log
files.
Other things:
- Fixed that translog_purge_at_flush() will not stop deleting files even
if one file could not be deleted.