Make all scripts OUT_DIR_COMMON_BASE gnostic

This patch add fucntionality to mimic the environment varible added to
AOSP by JBQ; here goo.gl/GVT7Xl .

Previously, and without this, a build initiated by our build-pac.sh
script would work until the initial compilation would complete, upon
starting the optimizing and final zip creation it would fail to find the
OUT directory only looking directly in the source folder.

With this patch, if OUT_DIR_COMMON_BASE is null/undefined in .bashrc the
use functions the exact same as if the patch were not present, when it
is defined it returns 1 causing the patch to use OUT_DIR_COMMON_BASE as
OUT_DIR.

UPDATE: Once pulled, you have to copy the build-pac.sh from
vendor/pac/tools to the base of your source and make it an executable.
After you do that, with the changes you can test you build as normal
noting the output of the patch above the build.
Example to compare: http://pastebin.com/XZ8Mfex2

PS1: Initial Patch, Much hacks, Fix builds for self; Unsure if work for
others.
PS2: Actually make this function, less hacks; should work no mater what.
PS3: Clarity about testing patch.
PS5: Fixes overlaping variables.
PS6: Finally.
PS7: (^_^)

TODO:
1. Submit patch.

Change-Id: Ia224bcbf87070664cc174c2fb597590f66893b35