update gradle build scripts to be consistent; cleanup AndroidManifest files

Revert all changes in AndroidManifest.