Add CDH5 profile

Adds a profile for CDH5 and fixes some places where we are using APIs that are not binary compatible (e.g. Hive's TypeInfoFactory, a completion of CDK-416).