Defect and Fault Modeling Framework for STT-MRAM Testing