FlexRAN: A Flexible and Programmable Platform for Software-Defined Radio Access Networks