Development of extended x-ray absorption fine structure spectroelectrochemistry and its application to structural studies of transition-metal ions in aqueous solution