Learning Resource-Aware Classifiers for Mobile Devices: From Regularization to Energy Efficiency