Entropy in general physical theories