improve ccache and prebuilts support

Change-Id: I303af2373cbd341ebdb98f2105f9197b1c73ae38