Learning Binary Code Representations for Effective and Efficient Image Retrieval