Downloader: use Soup and set timeouts

Downloading via GIO uses gvfs internally. Unfortunately gvfs does not
set or handle connection timeouts, meaning that bad connectivity can
lead to a total hang.

Fixing gvfs is not easy:
https://mail.gnome.org/archives/gvfs-list/2013-July/msg00000.html

And while looking at the bug, I realised just how much overkill this
is. gvfs runs in a separate process and does the HTTP communication,
communicating back to gio over dbus, and has a few layers of abstraction.

The gio developers on IRC recommended just to use libsoup directly,
which is not hard. And we can set timeouts appropriately in order to
handle bad connectivity.

This required some tweaks to the internal Downloader API - we can now
handle cancellation much more directly.
ASLO updater: use Downloader class

Re-use the general downloader class for downloading activity
metadata, which means that interrupted connections will now error
and time out correctly.

This involved adding a "download to memory" interface to the
Downloader class, which has a new unit test.
Microformat updater: use Downloader class

Re-use the general downloader class for downloading activity
metadata, which means that interrupted connections will now error
and time out correctly.

This involved adding a get_size() request to the downloader, and a
got-chunk signal for users that don't require the entire download
presented as a single buffer.
httprange: use Downloader class

Increase code re-use by using the Downloader class instead of urllib2.
The advantage here is that Soup keeps around connections for a while,
so instead of re-creating TCP streams for each partial read, we just
re-use the existing ones. This results in a noticable speedup when doing
metadata lookups.

Another advantage is that we can run the main loop while we are waiting
for a response. This means that there is no need to create a separate
thread for metadata lookups.
Updater: handle cancel from STATE_CHECKED

Closing the activity updater when the list of updates was visible,
then reopening it again, resulted in an exception. Handle this
cancellation case properly.
Add missing test.txt

This is used by the Downloader tests.