#9881 MDS flush journal test

This is based on #7317 to avoid awkward merges later: ignore the commits up to 'hook in mds_full task'.
dur....all I can say is I was very tired on Friday. :)