Gaia Data Release 1. Principles of the photometric calibration of the G band