Thinking Fast and Slow: An Approach to Energy-Efficient Human Activity Recognition on Mobile Devices