Fixed #21430 -- Warning raised when unpickling Models and QuerySet from different versions

Thanks @charettes @akaariai @loic for help.
`msg = None`
then only warn if msg is set.