[4.8] Port AutoFDO support from google/gcc-4_8

Squashed commit of r199268, r199593, r201016,
r201021, r201022, and r201615

Change-Id: Ib01992091dbd9bd4f48c8882f0b047003d0b231d