Introduce ftl::Finalizer{<F>,Std,Ftl,Ftl1,Ftl2,Ftl3}

A Finalizer ensures a final cleanup function is executed when it is
destroyed. The cleanup can also be explicitly invoked before
destruction, or canceled so it is not executed.

As they are meant for one-time cleanup, Finalizers are moveable but not
copyable.

The templated `Finalizer<F>` can be constructed from any function object
that can be invoked with no arguments and that returns void. If `F` can
be default constructed, then `Finalizer<F>` can be default constructed.

`ftl::FinalizerStd` is an alias that uses `std::function` as the
function object type. `ftl::FinalizerFtl`, `ftl::FinalizerFtl1`,
`ftl::FinalizerFtl2` and `ftl::FinalizerFtl3` are aliases that use
`ftl::Function` as the type, with increasing amounts of fixed-size
internal storage for captured values. These are useful when specifying a
return type or a storage type, and are all default-construcible.

Bug: 185536303
Flag: EXEMPT New library code
Test: atest ftl_test
Change-Id: If4a130873ae38727e5bafd634344ae341640e742
diff --git a/libs/ftl/Android.bp b/libs/ftl/Android.bp
index 368f5e0..08ce855 100644
--- a/libs/ftl/Android.bp
+++ b/libs/ftl/Android.bp
@@ -21,6 +21,7 @@
         "enum_test.cpp",
         "expected_test.cpp",
         "fake_guard_test.cpp",
+        "finalizer_test.cpp",
         "flags_test.cpp",
         "function_test.cpp",
         "future_test.cpp",