The electrochemical theory of Sir Humphry Davy: Part I: The voltaic pile and electrolysis