URIs and queries to support profiles.

This change includes:
- A database upgrade to support tracking whether a contact represents the
  user's profile (represented as an optional raw contact ID specified
  per-account, and looked up in the various views).
- New Contact Provider URIs for retrieving profile-specific data:
  - profile: To retrieve the user's profile contact.
  - profile/data: To retrieve data for the user's profile contact.
  - profile/data/#: To retrieve data for a specific data entry for the user's
    profile entry, by data ID.
  - profile/entities: To select entities for the user's profile.
  - profile/as_vcard: To retrieve the profile as a VCard.
  - profile/raw_contacts: To retrieve or insert raw contacts for the user's
    profile.
  - profile/raw_contacts/#: To retrieve a specific raw contact entry for the
    user's profile, by raw contact ID.
  - profile/raw_contacts/#/data: To retrieve data for a specific raw contact
    entry for the user's profile, by raw contact ID.
  - profile/raw_contacts/#/entity: To retrieve raw contact entities for a
    specific raw contact entry for the user's profile, by raw contact ID.
- Permission checks to ensure that any access to profile data (whether
  explicitly through the above URIs or directly via ID) enforces READ_PROFILE
  or WRITE_PROFILE access.
- New and updated tests (including permission check cases for all of the above,
  plus query checks for each).

I've also had to move a few large tests to medium to work around
b/3329504.  I've also removed the database close step from contacts provider
test teardowns, as it doesn't seem to be necessary, and results in almost a 3x
performance boost on test runs.

Change-Id: I220552c26ad1eb3fbf24fdd865df2fe59fe4a688
13 files changed