From ion to atom to dendrite: Formation and nanomechanical behavior of electrodeposited lithium