Derivation of fluid conservation relations to infer near‐Sun properties of coronal mass ejections from in situ measurements