Pair distribution function analysis: Fundamentals and application to battery materials