Optimal harvesting, economic discounting and extinction risk in fluctuating populations