Machine Learning-Driven Scaling and Placement of Virtual Network Functions at the Network Edges