Investigating the Role of Image Retrieval for Visual Localization