Toward Energy-Efficient Machine Learning: Algorithms and Analog Compute-In-Memory Hardware