Scotland publishes bill on second independence vote