deploy/main: Unify some bits between admin-switch and admin-upgrade
Update .gitignore
tests: Small tweaks to pull corruption test

This one is failing here, I suspect it's the generic pull race
condition, but these fixes should make it slightly more reliable.
pull: Add a few more g_debug() and assertions

To help track down the race condition better.
libostree: Ensure we set standard::type when querying files

This makes the obvious code to recursively enumerate directories
operate more sanely.

Noticed this while trying to write corrupt-repo-ref.js.
tests/pull-corruption: Ensure we corrupt an object to be pulled

This test had some nondeterminism because we chose a random
object to corrupt, but because there were multiple commits, it
was possible that we chose an object that was not being pulled.

Fix this by writing some custom GJS code to find an explicitly random
object that exists in a given ref, an change a random byte offset.
This adds a lot more randomness to the testing too.
pull: Hopefully squash race where we would exit early

This is a redesign (again) of the pull code.  It is simpler and
survives 20 minutes of testing in a loop, whereas the old code would
only go from 30 seconds to 2 minutes.

The problem with the old code was that there was a race where we might
determine idle state even when there are content requests in flight
between the metadata thread and the main one.

This code majorly reworks things - there's now only one IDLE message,
sent in a circle from the main thread, through the metadata scanner,
and back to the main one.

Crucially it's only sent when the *main* thread is idle.  Previously
we were looking at whether the metadata scanner is idle, but that
doesn't make a lot of sense.  First let's make sure the main thread is
idle, then verify that the metadata one is.

This closes the loop because we'll have ensured we get any pending
requests.

https://bugzilla.gnome.org/show_bug.cgi?id=706456