A Scots MP whose husband was arrested as part of an investigation into Chinese spying allegations resigned the Labour whip.