ostree_fetcher: new function _ostree_fetcher_contents_membuf_sync

Move code from ostree-repo-pull.c

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
metalink: have a single entry to the metalink module

Replace _ostree_metalink_request_async with a synchronous version.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: remove two unused functions

_ostree_fetcher_query_state_text() and_ostree_fetcher_get_n_requests()
have no callers, so remove them.

If they will be needed, they can be easily copied back from the git
history.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-metalink: use _ostree_fetcher_contents_membuf_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: make _ostree_fetcher_stream_uri_sync private

Rename _ostree_fetcher_contents_membuf_sync to
ostree_fetcher_request_uri_to_membuf and drop unused argument
user_data.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ostree-fetcher: move more logic into ostree_fetcher_request_uri_internal

Make _ostree_fetcher_request_uri_with_partial_async and
ostree_fetcher_stream_uri_async simple wrapper around the same
function, all the requests are created in the same place now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>