Circuit modeling of spintronic devices: a SPICE implementation