Gold edges higher as stocks slide, oil slumps to 12-year low