Electrochemical fundamentals and recent developments of atomically scaled memristive devices