Calibration of the Advanced LIGO detectors for the discovery of the binary black-hole merger GW150914