Appeal judges overturn a ruling that found Islamic faith weddings were legally recognised in the UK.