Spectral analysis of selfadjoint elliptic differential operators, Dirichlet-to-Neumann maps, and abstract Weyl functions