X-ray intensity-hardness correlation and deep IR observations of the anomalous X-ray pulsar 1RXS J170849-400910