Multitask Spectral Learning of Weighted Automata