Measurement of the g-factor tensor in a quantum dot and disentanglement of exciton spins