Add gradle build file for ContactsCommon

Note, because the code now builds as a library project, resource IDs
are no longer final. This means that they can't be used inside switch
statements. Fix was to change everything to if statements.

Bug: 26676586
Change-Id: Ia4bee80783ab6b6f34c9b19e78f3b475dbea00b0
8 files changed