api/internal: extract get_system_info() function
api/internal: extract get_system_info() function

This will be useful in other places too.

QubesOS/qubes-issues#5099

QubesOS/qubes-core-admin,QubesOS/qubes-core-admin,marmarek/qubes-core-admin,marmarek/qubes-core-admin,QubesOS/qubes-core-admin,marmarek/qubes-core-admin