x86: Refactor pcie_cfgregopen
Split out some bits of pcie_cfgregopen that only need to be executed
once into helper functions in preparation for supporting multiple MCFG
entries.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D42829
(cherry picked from commit 9893a4fd31fa4b2e19a7b9cf786f49b9de50b407)