Add retry logic for Publishtests

@Praburaj 

adding retry logic as discussed
On windows HttpRequestException is being thrown. On Mono we observed WebException. So we can simply retry on both the exception cases. Even simply removing the comment will also make it good.