virt: move caching of virtualization check results into detect_vm() and detect_container()

After all, we ended up calling detect_container() more often than
detect_virtualization(), hence the former one should cache the results,
since the latter is only a wrapper around the former.