Try to stop the downloader test flaking.

Replace tempremental in-order mocking with a real output stream.
Allow maps to be serialised in any order.

Change-Id: Ie181cc23920b98717acdcac0fce02a9afdce6e85
Reviewed-on: http://gerrit.dmdirc.com/4066
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager