Convert `RefSetCache` to a proper class and to use a `Map` internally
Convert `RefSetCache` to a proper class and to use a `Map` internally

Using a `Map` instead of an `Object` provides some advantages such as
cheaper ways to get the size of the cache, to find out if an entry is
contained in the cache and to iterate over the cache. Moreover, we can
clear and re-use the same `Map` object now instead of creating a new
one.

mozilla/pdf.js,macroplant/pdf.js,nawawi/pdf.js,xavier114fch/pdf.js,Snuffleupagus/pdf.js,caremerge/pdf.js,Shoobx/pdf.js,nawawi/pdf.js,Snuffleupagus/pdf.js,caremerge/pdf.js,macroplant/pdf.js,Shoobx/pdf.js,showpad/mozilla-pdf.js,timvandermeij/pdf.js,timvandermeij/pdf.js,nawawi/pdf.js,showpad/mozilla-pdf.js,Snuffleupagus/pdf.js,timvandermeij/pdf.js,macroplant/pdf.js,mozilla/pdf.js,mozilla/pdf.js,showpad/mozilla-pdf.js,Shoobx/pdf.js,xavier114fch/pdf.js