Improving Performance and Mitigating Temperature Rise with Reconfigurable STT-NV Logic Based Functional Unit