Move basic commit API into ostree_sysroot_simple_write_deployment()

The admin commands had this shared in tool common, but we want to
encourage external programs to do this as well.