Malaysian court frees alleged rapist teacher - because he's 'impotent'