First Minister Nicola Sturgeon has said the Scottish Government will begin to prepare the legislation required to enable a second independence referendum to take place.