P-V criticality in the extended phase space of black holes in massive gravity