The numerical computation of Casimir energies and related spectral problems