Thorium in G-dwarf stars as a chronometer for the Galaxy