Current-induced magnetization hysteresis defines atom trapping in a superconducting atomchip