Groundstate energy spectra of knots and links: magnetic versus bending energy