create branch 3.0

--HG--
branch : 3.0
button press use the wrong record to popup the menu

issue3702
review3691004
(grafted from bd37eecc144a69857003d6d3c63c005558e105e9)

--HG--
branch : 3.0
extra : source : bd37eecc144a69857003d6d3c63c005558e105e9
Don't change group value when it is not needed

The group of xxx2many must only be changed for set and set_default. Other
methods should keep the removed/deleted records but as the older group was
destroyed this information is lost.

issue3724
review3971002
(grafted from be49866584eb20f42c231363fa1d9931e3f41c84)

--HG--
branch : 3.0
extra : source : be49866584eb20f42c231363fa1d9931e3f41c84
Fix inheritance of fields for group inside a tree

issue3754
review4291002
(grafted from e7c57bedeec83398a4d97641e84223cae5df20a2)

--HG--
branch : 3.0
extra : source : e7c57bedeec83398a4d97641e84223cae5df20a2
Fix instance test in init_selection

key could be empty but still the call must be for an instance.

issue3728
review4001002
(grafted from 5763e286214255f2afecebd1e7fa1bcbf0bcc78d)

--HG--
branch : 3.0
extra : source : 5763e286214255f2afecebd1e7fa1bcbf0bcc78d
Test if exposed before using computed values in motion

In some cases, motion event is triggered before expose.
So motion method should take care of such case.

issue3755
review4301002
(grafted from 98440408c4edc87758c6ad0fc7e5b683061cd397)

--HG--
branch : 3.0
extra : source : 98440408c4edc87758c6ad0fc7e5b683061cd397