Mental health and chronic pain patients are more likely to be considered difficult by their doctor, according to an international study.