build-and-provide-package: get rid of dependency on dcmd

When running via PROVIDE_ONLY the build-and-provide-package would need
the dcmd from devscripts, but we'd like to avoid dependency on devscripts
for repository hosting hosts. Since dcmd is quite a trivial script overall
let's just replace it with our own code.