pkg: allow pkg_cflags() and pkg_libs() utility functions to have a user-provided list pointer. Also chase this change in the frontend.