Testability and Fault Tolerance for Emerging Nanoelectronic Memories