Finite-element methods in electronic-structure theory