Provide a C-API to efficently convert `dict` into `frozendict`

I created the discussion Add a dict method to convert to a frozendict? to propose adding methods to dict, list and set for effecient conversions to immutable frozendict, tuple and frozenset.