People who are worried about losing their jobs may be more likely to be diagnosed with diabetes, according to a new analysis.