core: Attempt direct link() and fallback on EEXIST
core: Attempt direct link() and fallback on EEXIST

Rather than always doing:

1) make temporary link
2) unlink() target
3) rename()

Just try making the link, and only do the second two if the file
already exists.  This reduces system call traffic a lot.

leandrosansilva/ostree,gatispaeglis/ostree,GNOME/ostree,leandrosansilva/ostree,GNOME/ostree,gatispaeglis/ostree,resin-io/ostree,gatispaeglis/ostree,GNOME/ostree,gatispaeglis/ostree,sujitfulse/ostree,resin-io/ostree,sujitfulse/ostree,sujitfulse/ostree,leandrosansilva/ostree,gatispaeglis/ostree,resin-io/ostree,leandrosansilva/ostree,sujitfulse/ostree,leandrosansilva/ostree,gatispaeglis/ostree,resin-io/ostree,resin-io/ostree,GNOME/ostree,GNOME/ostree,sujitfulse/ostree