lib: cpp: add missing functional and cmath includes

Manual runs of the autotools docker script were failing due to
`std::functional` not being a member of `std`. Similar error
messages for `std::ceil` and `std::log`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
5 files changed