pci: Add helper routines to iterate over a device's BARs.
Reviewed by: imp, markj, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36237
(cherry picked from commit 16bedf532c022f2380b0bb2970a3a3ebc7ca0f36)