Refactor Android build part in build_wrapper.py

Change-Id: Iba58999bd0313d3efd7a1e7ddad79111b032d37c
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>