refactor +pkg_emit_manifest_file() and +pkg_emit_manifest_sbuf().

  Both routine shared most of their body, only the libyaml output setup
  was different. They now are simple wrapper around
  pkg_emit_manifest_generic() which can handle both sbuf and file
  arguments.