``Physical process version'' of the first law and the generalized second law for charged and rotating black holes