gradle: add some configuration

use gradle daemon
configure ondemand
set memory jvm args

Change-Id: Idacfaba99847d4b858c815da82c15ba09379a9c2