Intrinsic galaxy shapes and alignments – I. Measuring and modelling COSMOS intrinsic galaxy ellipticities | Synapse