Added more sophisticated peak-finding algorithm.

The automatic pre-edge and shirley background subtraction
were failing for some cases where the photon energy
is very close to the peak energy (say, Carbon 1s using
325 eV photons) because the background is so large.

The new algorithm is able to find the peaks in a more
sophisticated way via a spectral derivative and fft-smooth,
so handles these cases properly now.
Changes to docstrings.