Enable support for groups in External contacts accounts

This permits use with DavDroid and other external providers and lets external
contacts providers also do groups (as there's nothing otherwise stopping them)

Change-Id: I6b8133c03a1a647e52b32007a4891051c2c57999
Fixing Contacts crash when trying to merge two contacts

 * getRawContactId() can return null, so we need to be expecting that

Change-Id: I28cfb32dfda75ca0ebcaa97796ad682551d080bb