Morse theory and finiteness properties of groups