PR-1455: rewrite message priority values during upgrade.
PR-1455: rewrite message priority values during upgrade.

A host post-upgrade might have different priority on messages from pre-upgrade. In order to reduce confusions (e.g. messages with the same code before and after upgrade shown together with different priorities),  here we convert the messages pre-upgrade to use the new priority values.

We are using a very straightforward algorithm here: destroying a old message and recreating a new one keeping most of the settings untouched but the priority. A more elegant solution would be creating facilities to upgrade an existing message rather than destroy/recreate one. In fact, I was half way on that solution but decided to take the no so elegent but simpler approach. The straightfoward implementation can avoid many of the complexities because messages are not part of the datebase hence many things have to be updated manually (e.g. event, gen, symlink). It's much reliable to reuse the existing facilities rather than creating the new ones.

Signed-off-by: Zheng Li <fff69bf00b8ec5b6098a1768eaaaa75f40b8795d@eu.citrix.com>

huizh/xen-api,ravippandey/xen-api,djs55/xen-api,thomassa/xen-api,agimofcarmen/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,thomassa/xen-api,cheng--zhang/xen-api,jjd27/xen-api,cheng--zhang/xen-api,thomassa/xen-api,agimofcarmen/xen-api,jjd27/xen-api,huizh/xen-api,euanh/xen-api,jjd27/xen-api,agimofcarmen/xen-api,robertbreker/xen-api,cheng-z/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,Frezzle/xen-api,cheng--zhang/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,salvocambria/xen-api,euanh/xen-api,ravippandey/xen-api,robertbreker/xen-api,euanh/xen-api,ravippandey/xen-api,thomassa/xen-api,cheng--zhang/xen-api,rafalmiel/xen-api,anoobs/xen-api,robertbreker/xen-api,huizh/xen-api,djs55/xen-api,guard163/xen-api,srowe/xen-api,cheng--zhang/xen-api,djs55/xen-api,koushikcgit/xen-api,robertbreker/xen-api,huizh/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,cheng-z/xen-api,guard163/xen-api,agimofcarmen/xen-api,Frezzle/xen-api,salvocambria/xen-api,ravippandey/xen-api,guard163/xen-api,koushikcgit/xen-api,guard163/xen-api,euanh/xen-api,koushikcgit/xen-api,srowe/xen-api,cheng-z/xen-api,huizh/xen-api,simonjbeaumont/xen-api,anoobs/xen-api,thomassa/xen-api,rafalmiel/xen-api,salvocambria/xen-api,euanh/xen-api,vasilenkomike/xen-api,djs55/xen-api,rafalmiel/xen-api,thomassa/xen-api,anoobs/xen-api,srowe/xen-api,vasilenkomike/xen-api,rafalmiel/xen-api,anoobs/xen-api,srowe/xen-api,simonjbeaumont/xen-api,Frezzle/xen-api,koushikcgit/xen-api,jjd27/xen-api,jjd27/xen-api,rafalmiel/xen-api,salvocambria/xen-api,huizh/xen-api,cheng-z/xen-api,guard163/xen-api,ravippandey/xen-api,djs55/xen-api,cheng--zhang/xen-api,koushikcgit/xen-api,rafalmiel/xen-api,cheng-z/xen-api,guard163/xen-api,cheng-z/xen-api,Frezzle/xen-api,salvocambria/xen-api,koushikcgit/xen-api,simonjbeaumont/xen-api,ravippandey/xen-api,simonjbeaumont/xen-api,djs55/xen-api,jjd27/xen-api,Frezzle/xen-api,salvocambria/xen-api,agimofcarmen/xen-api,cheng--zhang/xen-api,anoobs/xen-api,anoobs/xen-api,srowe/xen-api,agimofcarmen/xen-api,cheng-z/xen-api,euanh/xen-api