The South Korean parliament has voted to defy the country's president and immediately lift his martial law declaration.