Using the Electrocardiogram for Pain Classification under Emotional Contexts