[build] Use LOCAL_MCS_FLAGS to give preference to the intermediate dir in System builds, and do not use temporary files for corlib builds