os-database: Make some methods static

So that one doesn't need an instance of OSDatabase to use these
state-less methods.
libvirt-machine-properties: Refactor mark_recommended_resources

Put code related to getting the os of a machine into a separate method.