Fault-Tolerant In-Memory Computing Using Paths-Based Logic and Heterogeneous Components