Elastic Slicing in Programmable Networks