Overhaul delete_dir.

It was recursing into symlinked directories and deleting the contents.  The
behavior now mirrors `rm -rf`. I renamed delete_dir as unlink_recursive for
clarity.
Fix delete_dir(...) so it doesn't recurse into symlinked directories.

Now more appropriately named unlink_recursive (with an appropriate
compatibility header).

* unlink-recursive:
  Overhaul delete_dir.