Emulation of Non-volatile Digital Logic for Batteryless Intermittent Computing