The Welsh Government is introducing legislation to give councils the power to apply a visitor levy to accommodation bills.