Resource Management in Fog/Edge Computing: A Survey on Architectures, Infrastructure, and Algorithms