RT::CustomField provides a wrapper to get the 'type', use it

Hardcoding ref here meant that if anything extends
RT::CustomField->_GroupingClass, it'll fail to find the groupings and
dump all your CFs into the Custom Fields group.  By calling back in to
GroupingClass, you get the 'magic' type and can look it up in the
groupings.

NewItem provides an empty CustomField with ContextObject set which
overriders of _GroupingClass can use for more context when
LimitoToGrouping is called on an empty object (during object creation)

RTIR uses this to provide an RTIR::Ticket grouping type so you can
separate CF groupings on RTIR tickets from those on core tickets.
Provided to allow better separation of groupings between RTIR CFs and
CFs on other Queues, especially since RTIR uses common names such as
'Customer' and 'IP' which would otherwise complicate using those CFs in
groups in other Queues. Perhaps points towards wanting per-queue CF
groupings.
Allow @Groupings to be passed in

The display template (ShowCustomFieldCustomGroupings) takes Groupings as
an argument, for symmetry, also take it during editing.

This allows code to better control which groups are shown
on Create or other editing pages (in particular, RTIR and the multitude
of complex editing/creating pages in that workflow).
Merge branch '4.2/customfieldgrouping-extensibility' into 4.2-trunk