aconfig: add support for cargo

Officially, aconfig is build using the Android tool-chain. However, to
speed up the local development cycle, add support for building with
cargo.

While it is possible to tell cargo to place the build artifacts outside
the source tree, there is no way to tell it to not generate the cargo
lock file in the same directory as Cargo.toml. Add a .gitignore to
ignore Cargo.lock and the target directory.

The way the Android build system and cargo generates code from the
protobuf files is slightly different. Tell cargo to enable the "cargo"
feature and introduce src/protos.rs to hide this difference from the
rest of the aconfig source.

Bug: 279485059
Test: m aconfig && aconfig
Test: atest aconfig.test
Test: cargo build
Test: cargo test
Change-Id: I85741f58cadae353ed95c124f566e4f4a7484186
diff --git a/tools/aconfig/src/main.rs b/tools/aconfig/src/main.rs
index 2f7255e..5414f0e 100644
--- a/tools/aconfig/src/main.rs
+++ b/tools/aconfig/src/main.rs
@@ -16,9 +16,11 @@
 
 //! `aconfig` is a build time tool to manage build time configurations, such as feature flags.
 
-use aconfig_protos::aconfig::Placeholder;
 use protobuf::text_format::{parse_from_str, ParseError};
 
+mod protos;
+use protos::Placeholder;
+
 fn foo() -> Result<String, ParseError> {
     let placeholder = parse_from_str::<Placeholder>(r#"name: "aconfig""#)?;
     Ok(placeholder.name)