build: add support for custom releasetools

Change-Id: I2337559ac669bb5868708c4726cbacbf5713261a
releasetools: use prebuilt boot image if using a custom boot image makefile

Change-Id: Ic348d31e8df7933dc4f9f055b7a5a2beacc21d32
Add repopick script from CM

patchset 4: cybojenix
  clean up the script:
    remove fetching from github
    cleaned up fetching locations of binaries
    if ANDROID_BUILD_TOP isn't defined, error out

PS 5:
  Added back the check if fetch succeeded.
  Fixed verbose print about fetching.

patchset 6:
  final changes
    fix detecting ANDROID_BUILD_TOP
    send all relavant data to stderr

Change-Id: If67c5f178d03fadd8b79b1908f4a9cb231efbb28
Allow prebuild APK's in Vendor

Change-Id: I361c32fac1e003ec985ffe2282bf8ef922b11ac0
Make the kernel image format parametric instead of a chain of if/elses

Change-Id: I54bfcdecb8647f7bcf744e72b2de19fcf4e4e7ac
Fix building custom recovery with userdebug

Credit Koushik Dutta

Change-Id: I41f1a91849f3aab435a3398696149afce68d8708
build: Fix zip creation on Mac OSX

When checking if files are symbolic links, then ota_from_target_files
expect the permissions of the file to be 0755 which is always the case
on Linux, but not on Mac OSX. I adapted the function so that permissions
are not included in the check anymore. Instead it uses only the type
attributes of the zip external_attr flags.
CM uses the same kind of check.

Change-Id: I5d5d0567cb798b765cbc19a66661163f80e21f70
ota: Disable downgrade check

We want users to be able to downgrade their packages.

Change-Id: I6bcbd4ee2a02640fe0855b0f1f197a02e914c927