JTAG_master class: fix bug that wrongly changed state to Scan when TMS is 0