Optical design and modelling of the QUBIC instrument, a next-generation quasi-optical bolometric interferometer for cosmology