Task-Preserving EEG Anonymization Using Latent Feature Masking