Manifold harmonics for integral equation based isogeometric analysis of acoustic and electromagnetic phenomena and shape optimization