The UK is to introduce a sugar tax on soft drinks as governments increasingly target obesity with fiscal measures.