Localization with Reconfigurable Intelligent Surface: An Active Sensing Approach