repo: Minor cleanup: Move size generation code initialization

It has a global effect, so do it in the entrypoint.
core: Deduplicate code converting struct stat -> GFileInfo

We were doing the same thing in a number of places, make a helper
function.
Enforce 'rdev' (device file major/minor) is 0

Historically OSTree supported device files, but it wasn't useful, and
added attack surface.  Support was removed in

https://git.gnome.org/browse/ostree/commit/?id=62a896350bd54bff5a9413d2ee0fad7ff4364f9a

Perform a further cleanup by enforcing internally that the device
major/minor must be 0.