A planning application for a two-pitch caravan site near Swindon has been approved after being resubmitted to Wiltshire Council for the third time.