Allow to directly write manifest into a FILE * or a struct sbuf *

Add 2 new functions:
pkg_emit_manifest_sbuf and pkg_emit_manifest_file