Gravar-mail: Generalized optimal spatial filtering using a kernel approach with application to EEG classification