Memristive response and electrochemical processes in polyaniline based organic devices