Android: make libcurl shared lib optional for AOSP

Also sed remains of dynamic vars in scripts (@@DIFF@@, @@PERL@@)

Note about perl: its only used in a few scripts (like git-am)
and is not fully required for git tools.

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>