Revert "Deep Bloat, again"

This reverts commit e74cc433cf9ae056bb985e18c12b4489ffdb94a8.
build: work around missing readlink -f on Mac

Change-Id: I5d56366cf33a2b02f1886c87815d00cff279779d

Conflicts:
	core/envsetup.mk
Add SED_INPLACE macro - based on squashed commits from Cyanogenmod

Make sed in-place more portable

In-place sed (sed -i) works differents for GNU vs BSD version like
what is found on OS X.

This adds a check and does a sed -i for GNU and a sed -i '' for
Darwin only.

This allows my OS X machine to fully compile CM without the need
for any GNU specific packages.

Author: Brandon Bennett <bennetb@gmail.com>

Darwin: Use gsed for SED_INPLACE if found.

Change-Id: I5922b31ff2d192d5c6cc0cd8cabfe64d8b4f2620
Author: Koushik Dutta