Added custom kernels to SpectralClustering

Added custom kernels as per #1791.