The fine structure of two-electron states in single and double quantum dots