The transit network design problem with elastic demand and internalisation of external costs: an application to rail frequency optimisation