Scotland’s government will start to protect its EU membership and prepare for a possible independence vote, Sturgeon says.