d2: Add CC_OPTIMIZE_FOR_PERF and ""_FOR_SPEED and more opts

Change-Id: I2af7808c70df7ab297b94be99b5be241f2375aca
Signed-off-by: bmc08gt <bmc08gt.teamb00sted@gmail.com>
Signed-off-by: Hieu Phan <aznrice2k4@gmail.com>