[libcontacts] Add API for name grouping.

Allow a customized name grouper to be set.