add helper method to retry a function in case we get a StaleElementException due to bad timing of javascript dom updates
fix race condition when waiting for dataset import spinner to disappear