• Bug 1620005 - Refactor WebRender display item caching r=jrmuizel

    DisplayItemBuilder now has methods:
    ```
    void StartGroup(nsPaintedDisplayItem* aItem);
    void CancelGroup();
    void FinishGroup();
    bool ReuseItem(nsPaintedDisplayItem* aItem);
    ```
    WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
    which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
    Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().
    
    For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
    ```
    aBuilder.StartGroup(this);
    aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                      wr::ToColorF(ToDeviceColor(mColor)));
    aBuilder.FinishGroup();
    ```
    
    Differential Revision: https://phabricator.services.mozilla.com/D65356
    
    [ghsync] From https://hg.mozilla.org/mozilla-central/rev/91760460f91496fb2262242dcdf7c0deb311978c
    mikokm authored and moz-gfx committed Mar 12, 2020