Scotland’s first-ever visitor levy has been approved by councillors in Edinburgh.