Molecular Level Understanding of Reaction Mechanisms in the Electrodeposition and Electroless Deposition by Theoretical Analyses