Ab initio study of magnetic tunnel junctions based on half-metallic and spin-gapless semiconducting Heusler compounds: Reconfigurable diode and inverse TMR effect for magnetic memory and logic applications