Auto merge of #1016 - debris:fs-swap-api, r=alexcrichton
Auto merge of #1016 - debris:fs-swap-api, r=alexcrichton

added renamex_np, renameatx_np

these function can be used to atomically swap files

- added 2 macos specific functions - `renamex_np` and `renameatx_np` and two constants `RENAME_SWAP` and `RENAME_EXCL`
  - [macos stdio.h](https://github.com/apple/darwin-xnu/blob/0ddccd8/bsd/sys/stdio.h#L45-L48)
  - [docs](http://www.manpagez.com/man/2/renameatx_np/osx-10.12.3.php)
- ~added linux specific `renameat2`. according to the [docs](http://man7.org/linux/man-pages/man2/rename.2.html#VERSIONS) it was added to Linux in kernel 3.15.~

rust-lang-nursery/libc,rust-lang-nursery/libc,rust-lang/libc,rust-lang-nursery/libc,rust-lang/libc,rust-lang/libc