how is gold extracted and purified