[Bug 936569] merge curatedgroups branch into master, thanks to @dpoirier and @wbowling

Bug 951840, bug 936570, bug 937673, bug 938184, bug 938674, bug 938680,
bug 938695, bug 938723, bug 939127, bug 947271, bug 948491, bug 948640,
and bug 951515 are fixed by this patch.