Online Learning-based Distributed Resource Allocation and Service Management in Edge Networks