Ion sensing with thread-based potentiometric electrodes