Learning to Linearize Deep Neural Networks for Secure and Efficient Private Inference