Foreign investors boost Abu Dhabi and Dubai shares