Contact-dependent infection and mobility in the metapopulation SIR model from a birth–death process perspective