Unbounded Fredholm Operators and Spectral Flow