In the 1800s, people in mining towns in the west often paid for goods with gold nuggets or gold dust. what was the function of gold?