Use debug versions of dex2oat explicitly.

Change-Id: Ie7c238908a5739af752a08fec1a04914026a8f96
Bring main.mk in sync with master.

These lines were removed in aosp in commit e2d27887b
but a bad merge conflict resolution left them in master.

Subsequent changes on master started using these variables
so they're being brought back.

Change-Id: Ic8f3c295130c47eb0d66057880f9d4f70c89af94
Merge "Use debug versions of dex2oat explicitly."
Merge "Bring main.mk in sync with master."
Call "java[c] -version" only once

and print out the full output if error occurs.
Bug: 11672548

(cherry picked from 7b66d366bf5c469130f71d0870424fcd265e0301)

Change-Id: I8e2f2ffa2f28146405273b04667efe3c8d1c03ad
Merge "Call "java[c] -version" only once"
Add warning message for java6 builds.

The instruction URL has been amended and a few additional
details have been added.

(cherry picked from 8c06afdea3d3c422d653b40fd19d5e3d4be64af2)

Change-Id: Icaffc3b13ed881ac7e29f2021ed31eb1f877a5ab
Merge "Add warning message for java6 builds."
auto-merger: merge in from aosp/master