AdaFlow: Opportunistic Inference on Asynchronous Mobile Data with Generalized Affinity Control